home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Periodicals
/
General
/
Mac Script
/
mac-script-94-05.txt
< prev
Wrap
Text File
|
1994-06-09
|
641KB
|
15,094 lines
Subject: MacScripting digest
Date: Mon, 06 Jun 94 21:57:57 -0500
From: Fred Terry <pfterry@lks.csi.com>
This is the MacScripting digest for May 1994.
=========================================================================
Date: Sun, 1 May 1994 20:15:40 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: MS: MIME II
>Ooops. Your right, the FULLHDR option is on a list-by-list basis, not
>server wide, so the right syntax is indeed:
Fred and or Andy...
OK, having to make this change has caused me to subscribe to the list in
the form by which my Internet host currently identifies me. I also did a
REVIEW...it appears that the old entry is this one (names before and after
for context):
HXW103@PSUVM.PSU.EDU Hao Wang
JWBAXTER@PT.OLYMPUS.NET John Baxter
macscript@PTOLEMY.ARC.NASA.GOV MacScrpt gateway
The new one is:
sheaj@OHSU.EDU Jackson Shea
jwbaxter@OLYMPUS.NET John W. Baxter
Jordan_Pallack@ONENET-BBS.ORG Jordan Pallack
At your leisure, please remove the JWBAXTER@PT.OLYMPUS.NET entry...this is
not a priority matter. Many thanks!
It seems to me our group is smarter than the Internet average...I only
counted 10 people named "your name" (actually, one of those is "<your
name>"), out of 662.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Sun, 1 May 1994 23:49:52 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Daniel J Keldsen <djk@WORLD.STD.COM>
Subject: problems using installed OSAXen
Specifically, I've had problems using various people's implementations of
"Choose folders" and "Choose files." I realized that perhaps the OSAX
that have the same command name might be conflicting, so I removed one of
the beasts and tried the supplied example to (still) no avail. I'd
thought you just had to lob the stuff into the Scripting Additions
folder. Am I wrong?
Also, anybody gotten the "Display text" addition to work? For that
matter, anybody have a better handle on French than I do (rusty 3 years
of High School French ain't handlin' it) to translate the supplied docs?
Thanks folks. It's been a rewarding experience to listen to you
Experienced Scripters...
.................................................................
"Umbernay oneay, ouyay avehay the ridgebay..." - pig-latin ST:TNG
dan keldsen - djk@world.std.com
.................................................................
=========================================================================
Date: Sun, 1 May 1994 21:49:00 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mark Alldritt <alldritt@WIMSEY.COM>
Subject: Re: parsing text in AppleScripts
>I have a question that doesn't appear to be addressed in the FAQ or
>Tao of AppleScript. It's fairly clear from the language description
>that AS is not intended to be a text-parsing language, but I'd like
>to find some basic string manipulation beyond that offered in the
>String Commands osax that comes with AppleScript. The only thing
>I've found that comes close were some of the Rinaldi externals
>in the XCMD osax package, but the functionality is not exactly
>what I'm looking for.
>
>Specifically, I'd like something that would let me manipulate
>strings as in HyperCard -- for example:
>
> get char (offset "[" of str) to (offset "]" of str) of str
>
>which would mimic the HyperTalk
>
> get char (offset("[",str)) to (offset("]",str)) of str
>
>which returns "[text]", say, if str is "Some [text] here".
ScriptTools 1.3 offers a regular expression OSAX which should be able to
do what you are looking for. For instance:
property myPattern : compile regular expression ".*([.*]).*"
set theMatch to match regular expression myPattern to str
match 1 of theMatch
Script Tools is available from Info-Mac and the AppleScript archive
(gaea.kgs.ukans.edu).
-Mark
=========================================================================
Date: Mon, 2 May 1994 02:50:02 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tom Pollard <pollard@CHEM.COLUMBIA.EDU>
Subject: QuicKeys and AppleScript
Jon Pugh recently responded to a question about nonscriptable dialogs:
>
> As soon as I mailed that I realized that the answer I know of is QuicKeys
> 3.0 which can be called from AppleScript. It's fairly easy too. Record
> your QK script which pushes the buttons from the Script Editor and call
> that from your more complete and functional script.
(People haven't talked much about mixing QK and AS scripts, so I thought
I'd elaborate on Jon's answer. Apologies if this unneccesary.)
It sounds like he's suggesting making a QK3.0 shortcut and then calling
that from the AS script. That works fine, but you can also write QK
scripts on the fly within AS and send them to QK using its DoScript
event. The (perhaps minor) advantage is that there's only one script
when you're done.
To generate the QK script for use with DoScript, you have to write it in
QuicKeys' own scripting language. Since QK3.0 is AppleScript-
recordable, you can generate the QK script by choosing QuicKeys as your
AS dialect and recording the macro from the AppleScript Editor. A
downside to this, however, is that QK will record many actions such as
menu selections and button presses as mouse motions, which are ok, but
hard to decipher or maintain later.
It's not much harder, but much more satisfactory, to use QK's own
scripting commands directly. Here's an example from a AS applet that
I wrote to control the console i/o dialog of a hastily ported Unix app
('diff'). This snippet starts up the 'diff' app, writes a
command line into the box, hits a radio button to select file output,
specifies the output file in the standard file i/o dialog, punches 'OK',
and hits a return to exit the program... ('B's are option-returns)
set outName to (file of pathParts of outFile)
try
--- tell QuicKeys to start up diff and type in the command-line arguments
--- ... and to specify our output file using the file i/o dialog
tell application "QuicKeys* Toolbox" to B
Do Script ("File \"" & appFile & "\"" & return & B
"Wait Application \"" & appName & "\" running " & return & B
"Text \"" & (cmdline as string) & "\"" & return & B
"Button \"file\"" & return & B
"Text \"" & (outName as string) & "\"" & return & B
"Button \"Save\"" & return & B
"Button \"OK\"" & return & B
"Keystroke %36" as string)
set tempOut to myDir & ":" & (file of pathParts of outFile)
relocate (alias tempOut) to (alias (folder of pathParts of outFile))
on error
end try
As an aside, the 'diff' script that the above snippet comes from is
actually pretty useful. I use it as an applet on which you can drop
pairs of files and/or folders and have them 'diff'ed. There's a custom
dialog window that let's you verify or change the input and output
files, select command line options, and refer to the help file, if
neccesary. Last time I checked, none of the other 2 or 3
file-comparison apps were drop-launchable in this way. I've got the
same interface grafted onto a port of 'patch', as well, but haven't used
it as much.
I've been wanting to submit this script to gaea, but there's one
situation that it still barfs on, which is when the pathname of an input
or output file contains an apostrophe. Right now it uses apostrohes to
quote the file names to be written on the command line. It would be
better to escape special characters ['" ] in the Mac file names with
slashes, but AS 1.0 seems to be allergic to single slashes and always
inserts an escaped slash '\\' instead. Very annoying. Suggestions
would be welcome.
Cheers,
Tom
-------------------------------------------------------------------------------
W. Thomas Pollard Department of Chemistry
pollard@cucbs.chem.columbia.edu Columbia University
-------------------------------------------------------------------------------
=========================================================================
Date: Mon, 2 May 1994 00:13:47 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: problems using installed OSAXen
> I'd thought you just had to lob the stuff into the Scripting Additions
> folder. Am I wrong?
I believe you need to restart your Mac, too, since it is at startup time
that the event handlers implied by the existing osaxen are installed.
There might be magic going on that avoids that need. [I always restart
after adjusting the Scripting Additions folder, so I'm not sure it's
necessary.]
-- John
This is a test of an equal sign: =
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Mon, 2 May 1994 00:29:36 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: QuicKeys and AppleScript
>It would be
>better to escape special characters ['" ] in the Mac file names with
>slashes, but AS 1.0 seems to be allergic to single slashes and always
>inserts an escaped slash '\\' instead. Very annoying. Suggestions
>would be welcome.
Hmmm...I was going to suggest using AppleScript 1.1. However, AS 1.1 when
compiling this:
display dialog "\"Testing\'"
complains about an unknown token, selecting the '
Best I can come up with right now is based on this, which itself may be
AppleScript 1.1:
display dialog (ASCII character 39) & "Testing" & (ASCII character 39)
which displays 'Testing'
property quote: ASCII character 39
display dialog quote & "Testing" & quote
might be nicer.
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Mon, 2 May 1994 07:44:28 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Frank Lowney <flowney@MAIL.GAC.PEACHNET.EDU>
Subject: Re: Mail document to person as Eudora Attachment
>> Could not run the script "Mail to Peter" because the
>> script's data format is too new for the scripting format
>> to read it.
>> -1759
>>
>>What does this mean??
>
>I think it is apple's way of telling you that someone else has received a
>bundled copy or spent the dollars for Applescript 1.1 and now it is your
>turn to do the same :-(
>
>There was a message that went through with an improved salt-free version of
>the script. I suspect that just copying that text would be a better way of
>doing it.
>
>What is the concensus people? Was my posting the applet a mistake? Should
>I in the future cut and paste the script? Is this is the FAQ which I
>probably haven't read? Can anyone see a good reason to post the applet?
>
>Craig
>
For myself, I found the posting and, especially, the resulting
discussion/revision most instructive. I find that real-world examples are
an excellent supplement to the more contrived and abstract discussions
typical of cutting edge discussions.
*********************************************************************
Dr. Frank Lowney, Director, Regional Teacher Education Center
System Administrator, The GC EduNET Project
CBX 034, School of Education
Georgia College, Milledgeville, GA 31061-0490
Voice: (912) 453-5121
via GC EduNET, Georgia's Statewide K-12 Education Network, telnet to:
gcedunet.peachnet.edu
*********************************************************************
=========================================================================
Date: Mon, 2 May 1994 09:19:47 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Frontier 3.02 updaters
I have posted the Frontier 3.02 upgraders in
ftp://frontier/FromUserland/3.0.1to3.0.2Upgrader.hqx
ftp://frontier/FromUserland/3.0to3.0.2Upgrader.hqx
ftp://frontier/FromUserland/DocServerSourceText3.0.2.hqx
If you have any problems getting them, let me know. What follows is the
contents of the readme file explaining the differences.
Frontier 3.0.2 Upgraders
- ------------------------
Frontier 3.0.2 is a bugfix release, correcting problems reported in
Frontier 3.0 and 3.0.1. It also expands support of array operations, so
upgrading is recommended for all users. A complete list of changes is in
the next section.
There are two upgrade packages in Lib 8. If you have Frontier version 3.0,
download UP3032.SEA, the 3.0 => 3.0.2 Upgrader. If you have Frontier
version 3.0.1, download UP3132.SEA, the 3.0.1 => 3.0.2 Upgrader. If you
have Frontier 2.x and would like to upgrade to 3.0.2, send an email message
to Carolyn Franz at 76703,4047 for ordering info, or read UPGRAD.TXT in
this library.
Changes in 3.0.2
- ----------------
Array operations
* Multi-level array operations are now fully supported. Array references
can specify items within nested lists, records, strings and binary values,
to a maximum depth of eight levels.
* The nameOf verb, and the increment and decrement operators can be used
with array expressions.
file.copy verb
* When copying a folder hierarchy, newly-created folders retain the
attributes of the originals, including the creation and modification dates,
label, size, view, and custom icon. The attributes of preexisting
destination folders are not changed. (Note: the first time a newly-copied
folder is opened in the Finder, some attributes may not be recognized.)
* file.copy works properly when copying into an AppleShare "drop box"
folder, a folder for which the user does not have "See Files" privileges.
with statement
* Using an object in a with statement no longer affects object
specifications made in other, external scripts that are called within the
statement body. Local scripts do inherit the specified container, as
before.
* The isolation of external scripts from the context of a with statement
applies to scripts that are run using the evaluate verb. The evaluate verb
is used by the Run Selection command.
fileloop statement
* Fixed bug that caused the depth specification of a fileloop statement to
be ignored when the empty string was used to loop though all volumes.
fileloop (f in "", infinity) will visit every file on every disk.
* If the folder path in a fileloop statement specifies a file, a "folder
not found" error results. In the past, the loop would simply do nothing.
file.newAlias verb
* An alias file created by file.newAlias retains the label of the original
item.
file.reconcileFolder verb
* The original and clone parameters are validated as specifying existing
folders. Also, fixed bug that caused folder names to be merged with file
names when the case used by the parameters differed from that used in the
file system.
dialog.loadFromFile verb
* dialog.loadFromFile is used by dialog.runFromFile to copy a dialog's
resources into Frontier.root. The verb now handles CNTL, PICT and other
resource types, and resource IDs of 25000 or greater are recognized. This
provides for dialogs containing multiple custom controls, pictures, menus
or other items.
dialog.getValue verb
* dialog.getValue returns the title of button controls, mirroring the
action of dialog.setValue. It used to return the number zero.
setEventTimeout verb
* setEventTimeout works again; it was broken in 3.0.
speaker.sound verb
* The speaker.sound verb has a new implementation that improves
compatibility and works on all Macintoshes.
Other Language fixes and changes
* Improved translation of object specifier values to text. All application
tables that are loaded into memory are scanned for matching terminology.
(Tip: any table can be pre-loaded by referencing it in a startup script,
ensuring that it will be available for objspec translations.) This change
makes the results of one-liner scripts much more intelligible.
* Complex expressions involving double, binary, list and record types are
less likely to generate "expression is too big" errors.
* The decrement operator works on character values.
* Single/double-to-long coercions are range-checked.
* Fixed erroneous syntax error when a statement containing an escaped
quote character (\")in a string was followed by a comment.
Script Debugger
* When a script being debugged encounters an error, most of the debugger's
buttons are dimmed. The Kill and Lookup buttons remain enabled.
* When the component manager isn't available, UserTalk scripts show
"UserTalk" as the current language, not "<unavailable>".
Miscellaneous
* Added support for the object specifier clipboards created by Finder
7.1.3. Copying an item on the desktop and pasting into Frontier yields an
object specification for that item.
* If Frontier receives an "open document" Apple event for a file that it
already has open, the main window for that file is brought to the front.
* Fixed bug that caused DocServer's Jump To command to crash if the
Component Manager wasn't present,
* Worked around problem that led to memory leakage with some video boards
in 16/24-bit display mode.
* Fixed a memory leak when saving tables that contain filespec or compiled
code items.
* Made a few internal changes to improve handling of low-memory conditions.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry Cadence Design Systems pfterry@lks.csi.com +1 913 841 1283
=========================================================================
Date: Mon, 2 May 1994 09:36:52 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
Subject: Re: Enclosed App appearing on hard drive
I too was surprised. I don't think it's a problem sending an app - though I
agree sending a .sit or .sea is probably better.
We should all take a moment and think about what's appropriate for our own
setups in terms of the security of our machines. I think there's mention in
the Eudora documentation about possibly disallowing auto-decoding of
binhexes. You can also tell the listserv to not send you any enclosures.
Let's keep in mind that there are some people out there with bad intent.
Desmond K. Mullen - University of Minnesota, Office of Admissions
mulle009@maroon.tc.umn.edu - 612/625-0824
=========================================================================
Date: Mon, 2 May 1994 07:49:49 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Enclosed App appearing on hard drive
>I too was surprised. I don't think it's a problem sending an app - though I
>agree sending a .sit or .sea is probably better.
Keep in mind, too, that a .sea file is an application. So unless the
anti-virus stuff treats those specially, they'll be warned about.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Mon, 2 May 1994 09:08:00 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Michel <michel@NETCOM.COM>
Subject: Re: problems using installed OSAXen
>> I'd thought you just had to lob the stuff into the Scripting Additions
>> folder. Am I wrong?
>
>I believe you need to restart your Mac, too, since it is at startup time
>that the event handlers implied by the existing osaxen are installed.
>There might be magic going on that avoids that need. [I always restart
>after adjusting the Scripting Additions folder, so I'm not sure it's
>necessary.]
>
I heard that the Scripting Additions folder is checked each time a script
is compiled, provided the folder is dirty. So, if you add an addition, with
the Script Editor open, just dirty the script (type a space & then
recompile), and the new Addition will be seen.
=========================================================================
Date: Mon, 2 May 1994 11:13:40 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tom Donovan <donovan@COVIS.NWU.EDU>
Subject: Re: Enclosed App appearing on hard drive
>I too was surprised. I don't think it's a problem sending an app - though I
>agree sending a .sit or .sea is probably better.
>
>We should all take a moment and think about what's appropriate for our own
>setups in terms of the security of our machines. I think there's mention in
>the Eudora documentation about possibly disallowing auto-decoding of
>binhexes. You can also tell the listserv to not send you any enclosures.
>
>Let's keep in mind that there are some people out there with bad intent.
>
>Desmond K. Mullen - University of Minnesota, Office of Admissions
>mulle009@maroon.tc.umn.edu - 612/625-0824
To take another tack, I'm not overly concerned about the security (though
probably I should be), but I do think about the time involved in
downloading attachments. As someone who downloads most of his mail over a
dialup connection (meaning that I pay for it) I would rather that list
members offer to send a file to any who request it, rather than
broadcasting it to everyone.
--Tom
PS: A point to ponder: I seem to remember hearing about something in the
US Postal code saying that it's illegal for a recipient to be charged for
unsolicited merchandise sent through the mail.
Another of the many issues to be addressed as part of life on the infobahn!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Tom Donovan "The city is a place where a small boy, as he walks
System Administrator through it, may see something that will tell him what
CoVis Project he wants to do his whole life."
Northwestern Univ.
--Louis I. Kahn
E-mail: donovan@covis.nwu.edu
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=========================================================================
Date: Mon, 2 May 1994 11:17:07 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Frontier 3.02 updaters
In-Reply-To: Your message of "Mon, 02 May 94 09:14:29 -0900"
Oooops. My URL's were wrong. Here are the corrected ones.
I have posted the Frontier 3.02 upgraders in
ftp://gaea.kgs.ukans.edu/frontier/FromUserland/3.0.1to3.0.2Upgrader.hqx
ftp://gaea.kgs.ukans.edu/frontier/FromUserland/3.0to3.0.2Upgrader.hqx
ftp://gaea.kgs.ukans.edu/frontier/FromUserland/DocServerSourceText3.0.2.hqx
Sorry bout that.
pf
=========================================================================
Date: Mon, 2 May 1994 12:27:04 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Enclosed App appearing on hard drive
>PS: A point to ponder: I seem to remember hearing about something in the
>US Postal code saying that it's illegal for a recipient to be charged for
>unsolicited merchandise sent through the mail.
Not only that, you don't have to return it, either. Unsolicited
merchandise sent through the mail is a gift. [My recollection of Postal
Regs which may be remembered wrong or out of date.]
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Mon, 2 May 1994 18:09:12 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Daniel J Keldsen <djk@WORLD.STD.COM>
Subject: Re: problems using installed OSAXen
In-Reply-To: <199405020713.AA17077@world.std.com>
On Mon, 2 May 1994, John W. Baxter wrote:
> > I'd thought you just had to lob the stuff into the Scripting Additions
> > folder. Am I wrong?
>
> I believe you need to restart your Mac, too, since it is at startup time
> that the event handlers implied by the existing osaxen are installed.
> There might be magic going on that avoids that need. [I always restart
> after adjusting the Scripting Additions folder, so I'm not sure it's
> necessary.]
>
> -- John
I think I realized my mistake. I have most definitely rebooting whenever
I install new Additions, but it seems that somehow I ended up with TWO
SCripting Additions folders, one loose in the System Folder, the other in
the Extensions Folder. I moved everything to the Extensions:Scripting
Additions folder, and everything is *MOSTLY* kosher.
Some of the examples that come with certain scripting additions (I'm
being just a tad vague, eh?) contain direct references to apple events
(anyhow they're enclosed in <<slardibardfast>>), that seem to barf every
time. I'll compile a list of problems and see if y'all can help out on
that one.
This AppleScripting sure is fun stuff! I kind of miss the brevity of
C/C++ in the 'pseudo-English' code though...
Adios!
dan keldsen - djk@world.std.com
=========================================================================
Date: Mon, 2 May 1994 18:54:25 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "George A. Piotrowski Jr." <gap@ASTRO.OCIS.TEMPLE.EDU>
Subject: Applescripting the Chooser
I have been experimenting with Applescript recently and I was wondering if
there is a way to select a printer whether thru the chooser or not by using
Applescript? I want to be able to setup a startup script to set certain
options on a bunch of macs in a lab situation, and I would like all of the
macs in a classroom to bootup selected to the deskwriter that is setup in
the classroom, and also maybe cleanup the hard drive a little. Does anyone
know a way to do this or maybe know if there is a program out there in the
archives that can let you set the selected printer at startup.
Thanks in advance,
___________________________________________________________________
| |
| George A. Piotrowski, Coordinator gap@astro.ocis.temple.edu |
| Educational Computing Center Applelink: PIOTROWSKI1 |
| Temple University OH BOY! - Sam Beckett, QL |
|___________________________________________________________________|
=========================================================================
Date: Tue, 3 May 1994 13:22:30 +1200
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Norris <michael.norris@STONEBOW.OTAGO.AC.NZ>
Subject: Stop Eudora notification...
Hi, please excuse my novice dabblings into AppleScript.
In Eudora there is a property 'notify' which is a boolean. How do I set
that to false (set notify to false doesn't work).
Any help?
Cheers,
Michael Norris,
CAL Consultant,
University of Otago,
PO Box 56,
Dunedin,
New Zealand.
---------------------
Ph:(03) 479-7705
E-Mail: michael.norris@stonebow.otago.ac.nz
=========================================================================
Date: Tue, 3 May 1994 13:42:06 +1200
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Norris <michael.norris@STONEBOW.OTAGO.AC.NZ>
Subject: Re: Applescripting the Chooser
>I have been experimenting with Applescript recently and I was wondering if
>there is a way to select a printer whether thru the chooser or not by using
>Applescript?
You could do worse than use Hypercard with the XFCNs & XCMDs "DeviceList",
"CurrPrinter" & "ChooseDevice" from Fred Rinaldi. But then that's probably
not what you want. The Finder Scripting Toolkit doesn't let you do that.
Michael Norris,
CAL Consultant,
University of Otago,
PO Box 56,
Dunedin,
New Zealand.
---------------------
Ph:(03) 479-7705
E-Mail: michael.norris@stonebow.otago.ac.nz
=========================================================================
Date: Mon, 2 May 1994 20:48:27 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Applescripting the Chooser
In-Reply-To: Your message of "Mon, 02 May 94 18:54:25 EDT"
George,
>I have been experimenting with Applescript recently and I was wondering if
>there is a way to select a printer whether thru the chooser or not by using
>Applescript? I want to be able to setup a startup script to set certain
>options on a bunch of macs in a lab situation, and I would like all of the
>macs in a classroom to bootup selected to the deskwriter that is setup in
>the classroom, and also maybe cleanup the hard drive a little. Does anyone
>know a way to do this or maybe know if there is a program out there in the
>archives that can let you set the selected printer at startup.
Get a copy of GTQScriptLibrary. You'll find it in
ftp://gaea.kgs.ukans.edu/applescript/osaxen/GTQScriptingLibrary1.1.hqx
It has a Set Printer To scripting addition in it that should work.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Mon, 2 May 1994 21:41:25 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Applescripting the Chooser
>>I have been experimenting with Applescript recently and I was wondering if
>>there is a way to select a printer whether thru the chooser or not by using
>>Applescript?
>
>You could do worse than use Hypercard with the XFCNs & XCMDs "DeviceList",
>"CurrPrinter" & "ChooseDevice" from Fred Rinaldi. But then that's probably
>not what you want. The Finder Scripting Toolkit doesn't let you do that.
The Rinaldi XCMDs you speak of have been made part of the XCMDosax,
available (under something like that name) on the gaea server.
Note that choosing a printer is becoming more complex (software-wise) all
the time...several new wrinkles were added in LaserWriter 8.1 and related
Choosers...I don't know whether the ChooseDevice XCMD works with the
latest.
And choosing printers will change again, drastically, with QuickDraw GX,
and the desktop printer metaphore.
--John (typing by figurative candlelight through the power outage)
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Mon, 2 May 1994 23:12:17 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Submitting Scripts (and one for the Finder)
Personally, I think that submitted scripts should be done in text so that
they can be archived with the discussion. That way we can also see the
modification history of such things as Mail To Peter. Of course, the most
sensible reason is that some people still use 1.0 (money is the only reason
to continue using 1.0 and it's not that good of a reason).
In that vein, here's a scriptable Finder script which works well from OSA
Menu 1.0.1b3 or later. One of the bugs Leonard fixed made this script
useless. Now it works!
This saves the state of your open windows when you hold the option key down
and sets the windows to that state when you don't. You could easily make
this save the window positions too. I'm not the sort to move my windows
around though, so I didn't make it save that.
Jon
>------------------------------------------------------------------------<
property windowState : {}
tell application "Finder"
if (keys pressed) contains "command" then
-- save open window list
set windowState to every window
play sound "Cool"
else
-- close windows which shouldn't be open
set x to every window
repeat with w in x
if w is not in windowState then
close w
end if
end repeat
-- open windows which should be open
repeat with i from number of items of windowState to 1 by -1
open item i of windowState
end repeat
end if
end tell
=========================================================================
Date: Tue, 3 May 1994 07:20:33 EST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Sam McLane <Sam_McLane@COMPSERV.OCIS.TEMPLE.EDU>
Subject: Setting printer in applescript
Try the GTQ library of coomands:
set printer to: chooses the specified device type
set printer to string -- device type name
[named string] -- name of device
[using printer port/modem port] -- which serial port to use (valid
for
serial devices only)
[zone string] -- zone where device is
-Sam
=========================================================================
Date: Tue, 3 May 1994 07:23:09 EST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Sam McLane <Sam_McLane@COMPSERV.OCIS.TEMPLE.EDU>
Subject: Re: Setting printer in applescript
I should have added they are available on newton.uiowa.edu
-Sam
sam.mclane@compserv.ocis.temple.edu
=========================================================================
Date: Tue, 3 May 1994 04:25:55 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: network_manager@ALDUS.COM
Organization: Aldus Corporation, Seattle, WA
Subject: NDN:Setting printer in applescript
Your mail to the Microsoft Mail Server could not be fully
delivered! No Valid Addresses! It has been deleted.
Error List:
Bad 'To:' Address: david.rogers@MSM-Inter
=========================================================================
Date: Tue, 3 May 1994 09:43:26 LCL
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Rick Zeman <rick.zeman@HIS.COM>
Subject: Enclosed Applets
|Subject: Re: Mail document to person as Eudora Attachment
|
|> Could not run the script "Mail to Peter" because the
|> script's data format is too new for the scripting format
|> to read it.
|> -1759
|>
|>What does this mean??
|
|I think it is apple's way of telling you that someone else has received a
|bundled copy or spent the dollars for Applescript 1.1 and now it is your
|turn to do the same :-(
|
|There was a message that went through with an improved salt-free version of
|the script. I suspect that just copying that text would be a better way of
|doing it.
|
|What is the concensus people? Was my posting the applet a mistake? Should
|I in the future cut and paste the script? Is this is the FAQ which I
|probably haven't read? Can anyone see a good reason to post the applet?
Sure. I, not being a guru, find 'real life' examples to be most instructive.
However, I'd like to see them in a Stuffit wrapper: that way (due to the way I
get the digest) SITcomm won't say "Hey, a Binhex file!", extract it--and delete
the surrounding text (it's the way I've got it set up and I don't want to
change it).
_____________________________________________________________________________
Rick Zeman "Wer nie sein Brot mit Traenen ass,
rzeman@his.com Wer nie die kummervollen Naechte
Fidonet: 1:109/70.943 Auf seinem Bette weinend sass,
Der kennt Euch nicht, Ihr himmlishcen Maechte."
-- Goethe, "Wilhelm Meister"
=========================================================================
Date: Tue, 3 May 1994 09:19:04 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Enclosed Applets
In-Reply-To: Your message of "Tue, 03 May 94 09:43:26 -1100"
Rick Zeman comments on an earlier message....
>|There was a message that went through with an improved salt-free version of
>|the script. I suspect that just copying that text would be a better way of
>|doing it.
>|
>|What is the concensus people? Was my posting the applet a mistake? Should
>|I in the future cut and paste the script? Is this is the FAQ which I
>|probably haven't read? Can anyone see a good reason to post the applet?
>
>Sure. I, not being a guru, find 'real life' examples to be most instructive.
>However, I'd like to see them in a Stuffit wrapper: that way (due to the way
>I
>get the digest) SITcomm won't say "Hey, a Binhex file!", extract it--and delet
>e
>the surrounding text (it's the way I've got it set up and I don't want to
>change it).
This sorta argues against being able to comment on/discuss the scripts that
Jon Pugh referred to. The usual standards for mailing lists and newsgroups is
that binaries aren't distributed.
Why not work this way: for scripts that you are seeking help with or comments
on, post it into the list as text. If you want to distribute a finished
script, stick it in the incoming directory on gaea.kgs.ukans.edu (or mail it
to me); I'll put it in the appropriate place and announce that it's there.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Tue, 3 May 1994 07:49:35 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: T3 Backbone <willhoek@HALCYON.COM>
Subject: Re: Enclosed Applets
>...
>Sure. I, not being a guru, find 'real life' examples to be most instructive.
>However, I'd like to see them in a Stuffit wrapper...
Ditto here (please), as I prefer to keep my archives as .sit files.
[|][|][|][|][|][|][|][|][|][|][|][|][|][|][|][|][|][|][|][|][|][|][|]
I have *PROOF* that Bill Gates is The AntiChrist....
I do Tech Support.
willhoek@halcyon.com
[|][|][|][|][|][|][|][|][|][|][|][|][|][|][|][|][|][|][|][|][|][|][|]
=========================================================================
Date: Tue, 3 May 1994 08:48:21 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jordyn A Buchanan <Jordyn.Buchanan@M.CC.UTAH.EDU>
Subject: Re: Enclosed Applets
>|Subject: Re: Mail document to person as Eudora Attachment
>Sure. I, not being a guru, find 'real life' examples to be most instructive.
>However, I'd like to see them in a Stuffit wrapper: that way (due to the way
I
>get the digest) SITcomm won't say "Hey, a Binhex file!", extract it--and
delete
>the surrounding text (it's the way I've got it set up and I don't want to
>change it).
I may not be much of a guru either but Stuffit files will be have to be
BinHexed too, if the sender want to be transmitted through most mailers.
If you have SITcomm set up the way you describe above, you'll run into
similar problems if any Macintosh binary file is sent to you.
-------------------------------------------------------------------------
Jordyn A. Buchanan University of Utah
jab3418@u.cc.utah.edu ?Environmental Studies?
jabuchan@cadesm15.eng.utah.edu Hopefully Class of '95
jordyn.buchanan@m.cc.utah.edu
PGP Public Key: 0xADEEC1 ED 3D 36 5A 98 CE 9D B4 4B 37 0B 9B B5 D6 F3 4B
[keyid] [fingerprint]
Full PGP Public key available by finger, certified version by keyserver.
Wonder what PGP is? Just ask!
=========================================================================
Date: Tue, 3 May 1994 11:34:43 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Doug Baron <userland@NETCOM.COM>
Subject: Re: Frontier 3.02 updaters
In-Reply-To: <199405021551.IAA22179@mail.netcom.com> from "Fred Terry" at May
2, 94 09:19:47 am
> I have posted the Frontier 3.02 upgraders in...
Thanks, Fred, for posting the upgraders. A word of warning to all: there
is a change in the behavior of "with <object>" statements that can cause
some scripts that used to work to generate errors. If you do a lot of
object model scripting (in particular with QuarkXPress or FileMaker), and
use "with" statements routinely, it may be advisable to hold off on 3.0.2
and wait until a 3.0.3 update is available. In all other cases, 3.0.2 is
recommended and is a worthwhile download.
Doug Baron
UserLand Software userland@netcom.com
=========================================================================
Date: Tue, 3 May 1994 11:42:45 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Leonard Rosenthol <leonardr@NETCOM.COM>
Subject: Re: Submitting Scripts (and one for the Finder)
>In that vein, here's a scriptable Finder script which works well from OSA
>Menu 1.0.1b3 or later. One of the bugs Leonard fixed made this script
>useless. Now it works!
>
And before anyone asks - YES, I am working really hard to get 1.0.1
out with this and other fixes. Hang in just a bit longer!!!
Leonard
-----------------------------------------------------------------------------
Leonard Rosenthol Internet: leonardr@netcom.com
Director of Advanced Technology AppleLink: MACgician
Aladdin Systems, Inc. GEnie: MACgician
=========================================================================
Date: Tue, 3 May 1994 16:44:46 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Frank Lowney <flowney@GC3.GAC.PEACHNET.EDU>
Subject: HyperTalk & PathNames
We have a HyperTalk-based application that uses the Mac file hierarchy to
build menus, etc. and has to contend with new stacks appearing in new
folders without requiring a human operator to "find" the new stack so that
the STACKS global and the cd fld "paths" of cd "stacks" can be updated.
In automating this obnoxious process we discovered something rather weird
and I wonder if anyone else has bumped into this limitation as well. It
seems that HyperCard does just fine with filenames that are 29 or fewer
characters in length. Paths with filenames of 30 or more characters will
generate the "Where is..." dialog even when the path is in cd fld "paths"
of cd "stacks" and in the global "stacks"!
We have paths that are longer in terms of total length that work just fine.
The critical variable seems to be filename length.
If the Mac O/S handles a filename of up to 31 characters, why doesn't
HyperTalk do likewise. Is this a problem with HyperTalk or are other
scripting environments affected likewise? In short, can I beat this rap by
switching scripting languages?
*********************************************************************
Dr. Frank Lowney, Director, Regional Teacher Education Center
System Administrator, The GC EduNET Project
CBX 034, School of Education
Georgia College, Milledgeville, GA 31061-0490
Voice: (912) 453-5121
via GC EduNET, Georgia's Statewide K-12 Education Network, telnet to:
gcedunet.peachnet.edu
*********************************************************************
=========================================================================
Date: Tue, 3 May 1994 14:44:54 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: HyperTalk & PathNames
>In automating this obnoxious process we discovered something rather weird
>and I wonder if anyone else has bumped into this limitation as well. It
>seems that HyperCard does just fine with filenames that are 29 or fewer
>characters in length. Paths with filenames of 30 or more characters will
>generate the "Where is..." dialog even when the path is in cd fld "paths"
>of cd "stacks" and in the global "stacks"!
Using HyperCard 2.2, I didn't have that problem just now with a stack with
this name: a234567890123456789012345678901
which looks like 31 characters to me.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Wed, 4 May 1994 09:32:00 +1000
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Neville Smythe <Neville.Smythe@ANU.EDU.AU>
Subject: aete question
Two questions from someone who started early with AppleEvents and
AppleScript but has been a bit out of touch for a while:
1. What's the best way to construct and maintain an aete resource? The
Hypercard Aete Editor stack seems to have been withdrawn from the AE
Developer folder on ETO (my last version was 1.01b1). Has there been an
update? ResEdit can't use its aete template, and Rez is too clumsy for this
purpose.
2. How are Plural forms defined? The apple defined suites have them
("documents", "columns") but I can't see where in the aete or aeut resource
they come from, and no third party dictionaries seems to have plural forms
(which of course applescript users would expect to use when writing
scripts!).
$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?
Neville Smythe Neville.Smythe@anu.edu.au
Mathematics Department
School of Mathematical Sciences
Australian National University Tel: (06)-249 2709
Canberra ACT 0200 AUSTRALIA FAX: (61-6)-249 5549
$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?
=========================================================================
Date: Tue, 3 May 1994 18:50:23 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Edmund Lai <lai@APPLE.COM>
Subject: Re: Debugging applescripts
>
>No, not within the Script Editor. However, you can display variables in dialog
>boxes using the display dialog scripting addition and you can sprinkle beeps
>through your scripts to get "audio traces." If you have access to the
>AppleScript beta CD, there was a scripting addition on it called Show
>Variables which would display a modal window with variables in it.
>
Show Variables is also available from ftp.apple.com in
/pub/lai/osax/pgmTool.sit.hqx. It is bundled together with another
osax because it shares the TMPL resources.
"Show Variables" illustrates some of my philosophy about what part of
AppleScript debugger should look like. Most people would not be
using most of the features in "Show Variables" and for them
display dialog is adequate for the same purpose. In the debugger
they also just want display of simple data type such as text and
number in the display of variable because that is all they want.
This is unfortunate. AppleScript is designed to handle very high level
data structure which AppleScript aware application is suppose to
manipulate for the user. However such application are still relative
rare and AppleScript is used mainly as a low level language and this
does not really show off what AppleScript is about.
"Show variables" is meant to show off all kind of data structure, list
and record can be broken down to their component parts and it can be
done recursively so you can look into very complex structure. When the
data is a PICT, it will be displayed as a picture, and anything that
can be coerced into a PICT is likewise displayed as a PICT. So if there
is a scriptable graphic application, you can look at your variable in
meaningful way. And anything that has a ResEdit template resource such
as 'vers' 'DITL' can be seen as the component fields. It is unfortunate
that now we have very few script and application where these can be used.
Actually there is another part that I have partly implemented but was
taken out. Before there was system 7 alpha and HyperCard 2.0 (i.e. in
ancient historical time), for a short while I was supposed to be
responsible for an AppleScript debugger. At that time I claimed we don't
really need much of a debugger. Look at the classic BASIC, there is
no debugger other than the BREAK statement. After the break you can
examine variables by using the PRINT statement. In some way this is more
powerful the way modern debugger let you examine variable. For example
in HyperCard debugger, it let you display the HyperTalk variables.
However often you want to know about line 127 of a variable, afterall
that is how you do a two dimension array in HyperTalk. So often I end
up copy the variable to MPW, and line using the line command to find
out line 127. So a PRINT statement in a debugger is more powerful than
point and click in languages like HyperTalk and AppleScript that
supports chunk expression. So if we are in a break point and we can
execute statements on the variables, then you can examine and change
variable in the most powerful way. To illustrate the point, I wrote an
XCMD for HyperCard 1.x that just put up a dialog box, let you type in
a HyperTalk statement and depends on the XCMD callback to evaluate the
statement. It took me only a few hours to do the whole thing and yet
it was extremely useful. I tried to pull the same trick with AppleScript.
It was working before AppleScript beta, but it crashes on return to
AppleScript on return to AppleScript. In AppleScript beta they fixed the
bug, but the execution is now in a new context and so you cannot
examine and change the current variables in the current context. I
am told this is a feature and not a bug and that is why it crashed
before but not now. But this make it useless as a debugger. So I have
to take my "type in an expression and evaluate it" feature out. This
is unfortunate, otherwise we could have a partial solution to the
debugger problem.
/* Disclaimer: All statments and opinions expressed are my own */
/* Edmund K. Lai */
/* Apple Computer, MS303-3A */
/* 20525 Mariani Ave, */
/* Cupertino, CA 95014 */
/* (408)974-6272 */
zW@h9cOi
=========================================================================
Date: Tue, 3 May 1994 19:22:01 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: aete question
>Two questions from someone who started early with AppleEvents and
>AppleScript but has been a bit out of touch for a while:
>
>1. What's the best way to construct and maintain an aete resource? The
>Hypercard Aete Editor stack seems to have been withdrawn from the AE
>Developer folder on ETO (my last version was 1.01b1). Has there been an
>update? ResEdit can't use its aete template, and Rez is too clumsy for this
>purpose.
The latest version I know about of the 'aete' editor stack is found on the
AppleScript Developers Kit (version 1.1) CD, at
AppleScript=81:Development Tools:Tools Goodies:
Aete Editor Stack 1.0b3:Aete Editor b3
one path...broken by hand into two lines. b3 has been around a long time.
I often use Rez, often use the stack. ResEdit chokes on the size of most
'aete' resources. I am told that Resourcerer is the best, but I don't have
it. [Coupon for $177 is in the Symantec C++ 7.0 manual, which might induce
me to buy.]
>2. How are Plural forms defined? The apple defined suites have them
>("documents", "columns") but I can't see where in the aete or aeut resource
>they come from, and no third party dictionaries seems to have plural forms
>(which of course applescript users would expect to use when writing
>scripts!).
I've made several attempts to derez Scriptable Text Editor's 'aete' to
remind myself how it's done. I know it's simple. I'll try again later.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Wed, 4 May 1994 02:54:23 GMT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jay Hebert <jayh@LAISON.W8HD.ORG>
Organization: L'AISON - Beverly Hills, Michigan
Subject: FileMaker Pro & AppleScript Bug?
Has anyone else had a problem with FileMaker Pro refusing to go any further in
an AppleScipt?
As far as I can tell, the problem appears when I use a "Do Script
<something>" command. It does the FM script, and never quite gets back to the
rest of the main script!
Is there a reason for this? A work around? Is this a bug or am I missing
something?
(BTW: Setup=Centris 610 w/ AS 1.1, FM Pro 2.1v2)
[code fragment follows]
tell application "FileMaker Pro"
if not (Window "Login/out DB.b" Exists) then
Open alias "610 Internal:FileMaker Folder:Login/out
DB.b
"
else
Show Window "Login/out DB.b"
end if
--The following dialog gets displayed. Hey, what can I say? With the
included
-- editor, this is the extent of my debugging
display dialog "mmm"
Do Script "Delete All" -- This calls a couple of subscripts, is
that
relevant?
-- Do I need to post the text of the subscripts too?
--This dialog is NOT displayed. The commands intended to be there don't
either.
display dialog "ahh"
end tell
[end code]
Thanks for help, pointers, criticism of my .sig, virtual spitwads, etc.!
Jay Hebert
jayh@laison.w8hd.org
--
==========================jayh@laison.w8hd.org=========================
Metallica,|| When a man lies he murders / Some part of the world
To Live ||These are the pale deaths which / Men miscall their lives
is || All this I cannot bear / To witness any longer
To Die || Cannot the kingdom of salvation / Take me home
=======================================================================
1) These opinions are mine.-==- 2) Sending me mail gives me
I'm too self-interested to -==- permission to reproduce it in any form
speak for anyone else. -==- unless otherwise explicitly stated.
=========================================================================
Date: Tue, 3 May 1994 20:45:24 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mike Cohen <isis@NETCOM.COM>
Subject: Re: aete question
At 9:32 AM 5/4/94 +1000, Neville Smythe wrote:
>Two questions from someone who started early with AppleEvents and
>AppleScript but has been a bit out of touch for a while:
>
>1. What's the best way to construct and maintain an aete resource? The
>Hypercard Aete Editor stack seems to have been withdrawn from the AE
>Developer folder on ETO (my last version was 1.01b1). Has there been an
>update? ResEdit can't use its aete template, and Rez is too clumsy for this
>purpose.
>
I find that Marksman AppleEvent editor works much better (and faster) than
the stack. I still have only version 2.0 (and I trashed Marksman itself,
which I don't care for too much).
_______________________________________________________________
Mike Cohen
ISIS International | "Software that means business"
(818) 788-4747 Voice | isis@netcom.com | ALink: D6734
(818) 501-0653 Fax | NewtonMail, eWorld: MikeC | AOL: MikeC20
=========================================================================
Date: Tue, 3 May 1994 21:17:05 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: FileMaker Pro & AppleScript Bug?
>Has anyone else had a problem with FileMaker Pro refusing to go any further in
>an AppleScipt?
>
>As far as I can tell, the problem appears when I use a "Do Script
><something>" command. It does the FM script, and never quite gets back to the
>rest of the main script!
>
>Is there a reason for this? A work around? Is this a bug or am I missing
>something?
It appears that FileMaker is not returning any result from the do script
event. This worked for me (BOTH the activates are important)
tell application "FileMaker Pro"
activate
ignoring application responses
Do Script "Test4"
tell me to activate
end ignoring
end tell
display dialog ("Foo")
The first activate because FileMaker seems to expect it.
The second so that the display dialog is done with Script Editor in front.
Note that if you have the display dialog inside a tell application
"FileMaker Pro" then it executes in FileMaker's domain. The odd placement
of the second activate is not a necesary part of the above...I was in
mid-experiment. See a new thread.
Similar effects do NOT happen when the same (superficially) do script is
sent from Frontier, by the way. In the above, "Test4" is a leftover script
in a play database, which sends a do script to Frontier...I was testing
that combination.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Tue, 3 May 1994 21:36:10 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Ed Lai <lai@APPLE.COM>
Subject: Re: aete question
>>Two questions from someone who started early with AppleEvents and
>>AppleScript but has been a bit out of touch for a while:
>>
>>1. What's the best way to construct and maintain an aete resource? The
>>Hypercard Aete Editor stack seems to have been withdrawn from the AE
>>Developer folder on ETO (my last version was 1.01b1). Has there been an
>>update? ResEdit can't use its aete template, and Rez is too clumsy for this
>>purpose.
>
>The latest version I know about of the 'aete' editor stack is found on the
>AppleScript Developers Kit (version 1.1) CD, at
> AppleScript=81:Development Tools:Tools Goodies:
> Aete Editor Stack 1.0b3:Aete Editor b3
>
>one path...broken by hand into two lines. b3 has been around a long time.
>I often use Rez, often use the stack. ResEdit chokes on the size of most
>'aete' resources. I am told that Resourcerer is the best, but I don't have
>it. [Coupon for $177 is in the Symantec C++ 7.0 manual, which might induce
>me to buy.]
>
>
>>2. How are Plural forms defined? The apple defined suites have them
>>("documents", "columns") but I can't see where in the aete or aeut resource
>>they come from, and no third party dictionaries seems to have plural forms
>>(which of course applescript users would expect to use when writing
>>scripts!).
>
>I've made several attempts to derez Scriptable Text Editor's 'aete' to
>remind myself how it's done. I know it's simple. I'll try again later.
>
> --John
>
>--
>jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
>finger me to prove I'm all wet (Port Ludlow rainfall numbers).
If the aete editing involves plural, then b3 is not good enough, it has
a bug and will not output the plural. There is a b4 that fixes this
bug. I think /pub/appleevents/aete? in ftp.apple.com is b4, but I
am not 100% sure.
/* Disclaimer: All statments and opinions expressed are my own */
/* Edmund K. Lai */
/* Apple Computer, MS303-3A */
/* 20525 Mariani Ave, */
/* Cupertino, CA 95014 */
/* (408)974-6272 */
zW@h9cOi
=========================================================================
Date: Wed, 4 May 1994 02:07:14 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Atul Butte <Atul_Butte@BROWN.EDU>
Subject: TCP/IP Scripting Addition
I am now sending my TCP/IP Scripting Addition (version 1.0) to the
gaea.kgs.ukans.edu AppleScript archives. I think Fred Terry will post a
message when it becomes accessible. You will find a 95K self-enclosed
archive containing the TCP/IP Scripting Addition, a text document listing
the changes from the beta 1 version, a text document detailing the
Licensing Information, a text document describing the sample scripts, a
Word document describing the Programming Instructions, and five sample
scripts using the addition.
Basically, this Scripting Addition (osax) allows you to write scripts using
MacTCP commands in AppleScript. Potential uses of this include sending
e-mail through a script, checking if users are logged on (via Finger),
automating FTP, automating Gopher and NetNews, writing scripts to check
whether machines are up, UNIX lpr, and quickly writing many other TCP/IP
client-server programs.
There have been several changes since the beta 1 version -- you will need
to recompile your existing scripts. The Add Linefeeds parameter to the tcp
write command has been removed; instead, all the read/write commands
(including the file ones) now support translation using the ISO 8859-1
Internet standard character set (many thanks go to Peter Lewis for
providing this code). Several other bugs int he Scripting Addition and in
the sample scripts have been fixed. Please read the Programming
Instructions for more details.
There are five sample programs included with this 1.0 release of the TCP/IP
Scripting Addition. You may look at these sample programs and write your own
based on these. The sample code is provided as both compiled and text files
(to ease compatibility with AppleScript 1.0).
1. Drag and Drop FTP
Launch this application by itself, then enter the destination host and your
account name on that host. After the application quits, drag any files onto
the application. Enter your password and the destination directory in which
to store the files. The files will be transferred to the destination host using
the FTP protocol.
To change the destination host and account name, launch the application again
by itself.
You could modify this script to use another helper application to convert the
files to ASCII (Binhex) or AppleSingle. You could also modify it to use the
Password OSAX to hide the password as it is typed.
2. Finger
Launch this application, then enter a internet host name and account to check.
This program will use the Finger protocol to get more information about that
account (like last login time, office phone number, etc). The results are
placed in a new Scriptable Text Editor window.
3. Get Weather
This script finds the weather for Washington D.C., using the Gopher server
at wx.atmos.uiuc.edu. It takes the result and places it in a Scriptable Text
Editor window. You could add to this script to have it speak the weather to
you, or find you a weather map. Please note: the server this script uses
is not always up and running.
4. Gopher Server
Drag this application to a folder containing text files, then launch the
application. The text files in its folder (and those in any subfolder) will
be made available through Gopher. Use Gopher to connect to your Macintosh at
port 70 (the default for Gopher) and start browsing.
You could add to this script to support GIF/JPEG graphics files, or even
support the Gopher+ protocol.
5. Send Mail
Run this script, then enter your e-mail host and account when prompted. This
program will send a simple message to that account, using the SMTP protocol.
If you find any problems with the Scripting Addition or its documentation,
or if you have suggestions for future versions, please let me know.
Please take the time to read and follow the Licensing Information provided
with the package (I don't think it would be appropriate for me to mention
the various options and fees directly in this forum). If you use the
TCP/IP Scripting Addition for your own personal use, the licensing fee is
FREE. Otherwise, if you wish to use the Scripting Addition for ANY
business, company, or university related task, or if you wish to distribute
the Scripting Addition, please read the Licensing Information document for
more details.
Thank you very much for you support!
-- Atul
DISCLAIMER: This package has nothing to do with Brown University,
Howard Hughes Medical Institute, or the National Institutes of Health.
----------------------------------------------------------------------
Atul Butte
Brown University School of Medicine ('95)
currently at
Howard Hughes Medical Institute / National Institutes of Health
atul_butte@brown.edu
atul_butte@nih.gov
=========================================================================
Date: Wed, 4 May 1994 08:45:44 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: TCP/IP Scripting Addition
In-Reply-To: Your message of "Wed, 04 May 94 02:07:14 CDT"
I have placed Atul Butte's tcp/ip osax on gaea. You'll find it in
ftp://gaea.kgs.ukans.edu/applescript/osaxen/tcpip.osax.hqx
Enjoy.
pf
=========================================================================
Date: Wed, 4 May 1994 11:30:29 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: King Rhoton <king@ACPUB.DUKE.EDU>
Subject: Re: TCP/IP Scripting Addition
>I have placed Atul Butte's tcp/ip osax on gaea. You'll find it in
>
>ftp://gaea.kgs.ukans.edu/applescript/osaxen/tcpip.osax.hqx
There appears to be a problem on gaea. When trying to get a directory
listing or an actual file, I get:
425 Can't create data socket (129.237.140.40,20): Interrupted system call.
on both my Sun and Mac.
King Rhoton king@acpub.duke.edu
=========================================================================
Date: Wed, 4 May 1994 10:35:32 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: TCP/IP Scripting Addition
In-Reply-To: Your message of "Wed, 04 May 94 11:30:29 CDT"
Hi everyone,
>>I have placed Atul Butte's tcp/ip osax on gaea. You'll find it in
>>
>>ftp://gaea.kgs.ukans.edu/applescript/osaxen/tcpip.osax.hqx
>
>There appears to be a problem on gaea. When trying to get a directory
>listing or an actual file, I get:
>
>425 Can't create data socket (129.237.140.40,20): Interrupted system call.
>
>on both my Sun and Mac.
>
>King Rhoton king@acpub.duke.edu
There is currently a problem on gaea. I've alerted the powers-that-be about it
and I'll let you know when I find out anything.
Sorry about that.
pf
=========================================================================
Date: Wed, 4 May 1994 10:20:24 EST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Aaron E. McClennen" <Aaron_E._McClennen@HABITAT.ORG>
Organization: Habitat for Humanity International
Subject: Runtime 2.0.1 script.compile
I have an agent that copies a file from one computer to another on a certain
day
around 2:00 AM. The certain day is stored in the table.
There is also a script to change the day when the file is copied
local {
day};
day = people.IS.EducareCopy.copyday;
if Dialog.ask("Are you sure you want to change the day from "+day+"?", @day) {
table.assign( @people.IS.EducareCopy.copyday, day);
script.compile(@system.agents.caller);
}GThe recompile resets the sleepfor time so the day change has an
effect
however when I change the day I would expect script.compile to relaunch
system.agents.caller, except it doesn't.
Any suggestions?
Thanks in advance
Aaron_E.McClennen@habitat.org
"Building houses with Gods people in need."
=========================================================================
Date: Wed, 4 May 1994 12:31:40 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Laurent Daudelin <laurent@PLANON.QC.CA>
Subject: MACSCRPT FTP site???
Hi there!
I was trying to connect to the MacScript ftp site yesterday, and was wondering
what is the exact address. I tried an address taken from a precedent message,
address that was starting with "gaea", but, using Fetch, the connection seemed
to establish well, but, after some commands issued by Fetch to list the
content of a directory, an error was displayed in the Fetch transcript window
to the effect that the server was not able to allocate a port for the ls
command. I tried a couple of time with same result, all of this happened
around 1:00 am. What gives?
By the way, I found an answer to a precedent post of mine, titled "Applet &
Droplet". For those of you who are not "AppleScript gurus", if you want to be
able to save a script as a droplet (an application onto which you can drop a
file), you must have at least the handler 'on open (someParm)'. If you have
this handler in your script, ScriptEditor will allow you to save as a droplet
application, if not, you wont be able. It's maybe obvious to the vast
majority of readers here, but was not for me, and I thought that others could
feel like me :-) Sorry guys to bother you with this minor problem!
Thanks,
Laurent.
---
******************************************************************
Laurent Daudelin, Software Engineer
Planon TELEXPERTISE Inc., Boucherville, Quebec, CANADA
laurent@planon.qc.ca <-- NeXTMail welcome! (Mac Mail welcome too!)
=========================================================================
Date: Wed, 4 May 1994 13:25:14 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Steven L. Rohall" <slrohall@TASC.COM>
Subject: Frontmost app on old mac?
I developed a simple application with Frontmost and have succeeded in
running it on various machines with various configurations, INITs, etc.,
including: LCIII, Quadra 840AV, PowerBook 180, Quadra 610. I've attempted
to port it to a IIfx that is now running System 7.1. When I try to start
my application (saved as a complete application within Frontmost), I get an
error of type 3 (illegal instruction) before any windows are opened. I
also tried to run the Frontmost application itself on this machine and got
an error type 1 (bus error) just after the Frontmost logo window appears.
I checked things I could think of: it's running in 32-bit mode, no virtual
memory, 20M of RAM, fresh copy of System 7.1.
Am I overlooking something? Is there anything else I should check? Has
anybody else run Frontmost or AppleScript stuff on an older mac like a
IIfx?
-Steve.
+--------------------------------------------------------------+
| Steven L. Rohall |
| ________ _ ______ ______ |
| 55 Walkers Brook Drive / / \ / / / / |
| Reading, MA 01867-3297 / /___\ /______ / |
| Tel: (617)942-2000 / / \ // |
| Fax: (617)942-7100 / / \/______//______/ |
| slrohall@tasc.com |
| (MIME-conformant mail welcome.) |
+--------------------------------------------------------------+
=========================================================================
Date: Wed, 4 May 1994 10:31:12 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Finder Selection
The problem: someone asks "Where is XXX?" You know that XXX is buried
deeply in the folder structure on some CD-ROM. So you carefully type out
the full path to reach XXX, and send off your reply. This isn't what
computers are for.
Solution 1: Run Frontier including the FinderMenu extension. One of the
supplied items in the scripts menu it adds to Finder creates a Frontier
outline containing the full path to each selected item in Finder.
Solution 2: Run the Scriptable Finder, and use a script derived from the
following. Note that the script prefers to use the Jons Commands addition
to put the path(s) on the clipboard, but will use Scriptable Text Editor to
make the information available to you if you don't have Jons Commands.
Clearly, you should adjust the script to work the way you want it to.
[Tip: if you want to keep the list of paths as a list, DON'T simply coerce
the list to a string. Modify the repeat loop so that it coerces each item
to a string and appends it to a new list.]
set ans to ""
tell application "Finder"
copy selection to sel
repeat with x in sel
set ans to ans & (x as string) & return
end repeat
end tell
try
set the clipboard to ans -- Requires Jons Commands
on error
-- lacking Jons Commands, put the answer where it can be copied
tell application "Scriptable Text Editor"
make new document
set the selection to ans
activate
end tell
end try
This works well as a script in the Finder scripts folder when you use
Leonard's OSA Menu (once you have a version of that which is happy with
Finder).
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Wed, 4 May 1994 12:46:22 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: gaea
gaea.kgs.ukans.edu is once again accessible, but let's not overload it during
the day. :-)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry Cadence Design Systems pfterry@lks.csi.com +1 913 841 1283
=========================================================================
Date: Wed, 4 May 1994 11:26:59 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Michel <michel@NETCOM.COM>
Subject: Re: Finder Selection
>The problem: someone asks "Where is XXX?" You know that XXX is buried
>deeply in the folder structure on some CD-ROM. So you carefully type out
>the full path to reach XXX, and send off your reply. This isn't what
>computers are for.
>
>Solution 1: Run Frontier including the FinderMenu extension. One of the
>supplied items in the scripts menu it adds to Finder creates a Frontier
>outline containing the full path to each selected item in Finder.
>
>Solution 2: Run the Scriptable Finder, and use a script derived from the
>following. Note that the script prefers to use the Jons Commands addition
>to put the path(s) on the clipboard, but will use Scriptable Text Editor to
>make the information available to you if you don't have Jons Commands.
>Clearly, you should adjust the script to work the way you want it to.
>[Tip: if you want to keep the list of paths as a list, DON'T simply coerce
>the list to a string. Modify the repeat loop so that it coerces each item
>to a string and appends it to a new list.]
>
>set ans to ""
>tell application "Finder"
> copy selection to sel
> repeat with x in sel
> set ans to ans & (x as string) & return
> end repeat
>end tell
>try
> set the clipboard to ans -- Requires Jons Commands
>on error
> -- lacking Jons Commands, put the answer where it can be copied
> tell application "Scriptable Text Editor"
> make new document
> set the selection to ans
> activate
> end tell
>end try
>
Nice script, John. Here's a modified version of your repeat loop that
checks to see if any of the selected items are aliases. If they are, it
copies the path to the _original_ of the alias to the clipboard, instead of
the path to the selected alias:
repeat with x in sel
if kind of x is "alias" then
set ans to (ans & (original item of x) as string) & return
else
set ans to ans & (x as string) & return
end if
end repeat
Steve
=========================================================================
Date: Wed, 4 May 1994 11:27:03 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Michel <michel@NETCOM.COM>
Subject: Two short Finder scripts
Here are two useful scripts for the Scriptable Finder, most useful if you
have OSA Menu working with the Finder. Failing that, they are handy from
the Apple menu:
1. Send to back. Sends the front window to the back, promoting every other
window up 1 layer:
tell application "Finder"
set the index of window 1 to (the count of windows)
end tell
2. Close all but first. Closes all windows but the one on top:
tell application "Finder"
close (every window whose index is not 1)
end tell
3. (So, I lied when I said there were two, I can't stop myself.) This one
reveals the original of a selected alias.
tell application "Finder"
-- grab a list of selected aliases
copy every alias file of selection to selectedFiles
repeat with thisFile in selectedFiles
try
-- can we reveal the file?
reveal original item of thisFile
on error number errNum
if errNum is 5038 then -- original not there
display dialog "The original of the alias '" & the name of
thisFile & "' can't be found."
end if
end try
end repeat
end tell
Enjoy!
Steve
=========================================================================
Date: Wed, 4 May 1994 14:42:51 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Herb Schilling <hschilling@LERC.NASA.GOV>
Subject: Re: Frontmost app on old mac?
>I developed a simple application with Frontmost and have succeeded in
>running it on various machines with various configurations, INITs, etc.,
>including: LCIII, Quadra 840AV, PowerBook 180, Quadra 610. I've attempted
>to port it to a IIfx that is now running System 7.1. When I try to start
>my application (saved as a complete application within Frontmost), I get an
>error of type 3 (illegal instruction) before any windows are opened. I
>also tried to run the Frontmost application itself on this machine and got
>an error type 1 (bus error) just after the Frontmost logo window appears.
>I checked things I could think of: it's running in 32-bit mode, no virtual
>memory, 20M of RAM, fresh copy of System 7.1.
>
>Am I overlooking something? Is there anything else I should check? Has
>anybody else run Frontmost or AppleScript stuff on an older mac like a
>IIfx?
>
Hello,
Yes, I have run FrontMost apps on an IIfx running System 7 Pro. I have had
some problems with some specific things ( which Uncle Dave admits is a bug
), but otherwise it works fine. One thing I was told was to avoid using
complete applications for now. Use mini apps for now.
--
Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
sshws@convx1.lerc.nasa.gov
AppleLink: SCHILLING.H
=========================================================================
Date: Tue, 3 May 1994 23:41:00 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Comments: Warning -- original Sender: tag was ross@BNR.CA
From: ab026@FREENET.CARLETON.CA
Subject: Re: Clipboard juggling
Igor <igorl@uiuc.edu> writes:
>I am trying to use MenuEvents and Jon's Commands in tandem to copy selected
>text within an active window to the clipboard. Then, I place the contents
>of the clipboard into a string variable and pass it as an argument to a
>command directed to another application.
>
>The text definitely gets copied, but the application does not put the
>contents into the system scrap, rather it keep is locally. I thought that
>actiavting/deactivating between two apps would force the first application
>to set system scrap to its local scrap as it surrenders its foreground
>status, but is not the case.
>
>Here's what happens:
>
>1. The script runs, and the copy is performed via MenuEvents in app1
>
>2. App2 is activated, but the clipboard contains old system scrap data
>
>3. If I manually bring app1 to the foreground and then manually bring app2
>to the foreground (no other actions in between), the system scrap will
>contain new data.
>
>Because of this, I cannot use Jon's Commands' the clipboard OSAX as it
>seems to work with system scrap only. Forcing several iterations of
>activate app1, activate app2 does not help at all.
>
>So, is there a way to force an application to update system scrap?
>
>Below are two AS handlers that do the work:
>
>--
>
>on CopiedSelection()
> global menuID, itemID, hostApplication, selectedURL
>
> try
> tell application hostApplication
> activate
> Select Menu Item menu id menuID menu item id itemID -- copy the URL
>to the clipboard
> set selectedURL to (the clipboard as string) -- make local copy of
>the selection
> return true
> end tell
> on error
> return false
> end try
>end CopiedSelection
>
>--
>
>on FetchSelection()
> global selectedURL
>
> try
> tell application "Anarchie"
> activate
> --fetch url selectedURL
> end tell
> on error errorString number errorNumber
> -- better error handling under construction
> error errorString number errorNumber
> end try
>end FetchSelection
>From reading the code, it seems that you are using Jon's "the clipboard"
command immediately after copying the URL to the private scrap, i.e., before
the application "hostApplication" has been suspended in favor of Anarchie.
The data you want isn't in the desk scrap (where "the clipboard" can find
it) until that suspension occurs. Try moving "the clipboard" to the handler
which deals with Anarchie.
Ross Brown - AWOL Software Productions
PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
publisher of AWOL Utilities - "the best deal in freeware!"
ab026@freenet.carleton.ca
=========================================================================
Date: Wed, 4 May 1994 17:07:34 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Robert Mark <rmark@ISDMNL.WR.USGS.GOV>
Subject: Re: Two short Finder scripts
>Here are two useful scripts for the Scriptable Finder, most useful if you
>have OSA Menu working with the Finder. Failing that, they are handy from
>the Apple menu:
>
When I try to run these from OSA Menu, I get an out of memory error (-108).
They work if I launch them directly from the Finder. (Finder 7.1.3 with 32
meg).
What am I missing?
Robert Mark
USGS
rmark@isdmnl.wr.usgs.gov
=========================================================================
Date: Wed, 4 May 1994 21:54:17 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: Finder Scripts
Remember, any time you see a script with the Scriptable Finder's selection,
you can do the same thing without the Scriptable Finder and with Jon's
Commands.
tell application "Finder"
copy selection to sel
end tell
is the same as:
copy (finder selection) to sel
In addition, Jon's Commands is free. ;)
Also, here is Steve Michel's reveal alias script turned into my Alias
=46inder Pro application. ;) It does everything my app does (which is to
reveal the file unless you have the option key down, in which case it
brings up the Get Info dialog on the original). You can even save this as
a droplet and it will perform exactly like Alias Finder Pro. I guess I
didn't need to even write that sucker. ;)
on run
tell application "Finder"
-- grab a list of selected aliases
copy every alias file of selection to selectedFiles
repeat with thisFile in selectedFiles
try
-- can we find the original file?
if (keys pressed) contains "option" then -- Jon's Commands
open information window of original item of thisFile
else
reveal original item of thisFile
end if
on error number errNum
if errNum is 5038 then -- original not there
display dialog "The original of the alias '" & the name of=
thisFile =AC
& "' can't be found."
end if
end try
end repeat
end tell
end run
on open (theFiles)
tell application "Finder"
repeat with thisFile in theFiles
if (keys pressed) contains "option" then -- Jon's Commands
open information window of thisFile
else
reveal thisFile
end if
end repeat
end tell
end open
This one does need the Scriptable Finder though since it is the one that
resolves the aliases. I guess that means that Alias Finder Pro is still
useful to people without the Scriptable Finder.
Whew. ;)
Jon
=========================================================================
Date: Wed, 4 May 1994 22:00:17 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Two short Finder scripts
>>Here are two useful scripts for the Scriptable Finder, most useful if you
>>have OSA Menu working with the Finder. Failing that, they are handy from
>>the Apple menu:
>>
>When I try to run these from OSA Menu, I get an out of memory error (-108).
> They work if I launch them directly from the Finder. (Finder 7.1.3 with 32
>meg).
>What am I missing?
You are missing a future release of OSA Menu, which solves the problem.
While you wait, you can increase the memory partition allocated to Finder.
That's not as easy as it sounds, since Finder won't do it. Given ResEdit,
one approach is
1. Move Finder from the System Folder to your desktop
2. Option-drag a copy of Finder back into the System Folder.
The running Finder is now on the desktop...leave it alone.
3. Open the copy of Finder (in the System Folder) in ResEdit, and open the
SIZE resource. You can do the next step Finder's way: copy the SIZE -1
resource, making the copy have ID 0. Edit the new SIZE 0 resource to
increase the memory partition specified in the (final) numeric field.
Or, you can just edit the SIZE -1 resource to increase the number.
4. Save the modified Finder, and restart the Macintosh. Toss out the
Finder from the desktop (or be sensible and keep it in reserve for a while
in case I'm all wet).
How much extra memory? Be generous...increase it by 50% or so. [This
change seems, here, also to repair Finder's annoying habit of claiming
there isn't enough memory to do simple things, when there's clearly
plenty.]
Clearly, if you have two startup volumes, you can simple edit the inactive
Finder, restart on that volume, and edit the now-inactive Finder, rather
than going through the above.
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Thu, 5 May 1994 10:28:44 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Andy J. Williams" <Andy.J.Williams@DARTMOUTH.EDU>
Subject: MS: Monthly Admin Mailing
Save this mail message. It includes all the e-mail addresses you need when
dealing with the Mac Scripting mailing list.
*** To Unsubscribe from this list:
Send to: LISTSERV@dartmouth.edu
Subject: unsubscribe
Message: signoff macscrpt
*** To subscribe to this list:
Send to: LISTSERV@dartmouth.edu
Subject: subscribe
Message: subscribe macscrpt <your full name here>
*** To get other info on using this automated system:
Send to: LISTSERV@dartmouth.edu
Subject: help
Message: help
*** To ask the human moderators a question:
Send to: MacScripting-Request@dartmouth.edu
*** To send a message to the mailing list:
Send to: MacScripting@dartmouth.edu
Thanks.
-The Moderators (a very offcial way of saying "Fred & Andy")
=========================================================================
Date: Thu, 5 May 1994 11:30:21 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: George Synowiec <synowie@NICKEL.UCS.INDIANA.EDU>
Subject: retrieving the hardware address
Has anybody written an osax that would allow me to retrieve the
hardware address of the ethernet card of the machine I'm working on?
Nothing on gaea jumped out at me. ( yes, I checked the TCP/IP kit).
Or, alternatively, does a scriptable application exist that will
retrieve the address? Any help would be appreciated.
George Synowiec
Indiana University
=========================================================================
Date: Thu, 5 May 1994 10:57:55 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Shannon V Spires <svspire@SOMNET.SANDIA.GOV>
Subject: Controlling Send Mode?
How can I control the send mode of events sent with
Applescript, like the kAENeverInteract bit, etc.?
Thanks,
Shannon Spires
svspire@sandia.gov
=========================================================================
Date: Thu, 5 May 1994 13:11:16 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: King Rhoton <king@ACPUB.DUKE.EDU>
Subject: Re: retrieving the hardware address
>Has anybody written an osax that would allow me to retrieve the
>hardware address of the ethernet card of the machine I'm working on?
>Nothing on gaea jumped out at me. ( yes, I checked the TCP/IP kit).
>
>Or, alternatively, does a scriptable application exist that will
>retrieve the address? Any help would be appreciated.
Along these same lines, how about a ip#->name script or app. DNS runs on
port 53 (I believe), so I can open a connection, but I can't find
documentation for the data I need to pass to our DNServer to get the name
back.
King Rhoton king@acpub.duke.edu
=========================================================================
Date: Thu, 5 May 1994 14:13:24 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Atul Butte <ATUL@BROWNVM.BROWN.EDU>
Subject: Re: retrieving the hardware address
>Along these same lines, how about a ip#->name script or app. DNS runs on
>port 53 (I believe), so I can open a connection, but I can't find
>documentation for the data I need to pass to our DNServer to get the name
>back.
>
>King Rhoton king@acpub.duke.edu
I will add this to the next version of the TCP/IP Scripting Extension...
-- Atul
=========================================================================
Date: Thu, 5 May 1994 15:01:19 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Frank Lowney <flowney@MAIL.GAC.PEACHNET.EDU>
Subject: Re: retrieving the hardware address
>>Along these same lines, how about a ip#->name script or app. DNS runs on
>>port 53 (I believe), so I can open a connection, but I can't find
>>documentation for the data I need to pass to our DNServer to get the name
>>back.
>>
>>King Rhoton king@acpub.duke.edu
>
>I will add this to the next version of the TCP/IP Scripting Extension...
>
Along these lines, how would one obtain the ip of the source of an incoming
stream?
*********************************************************************
Dr. Frank Lowney, Director, Regional Teacher Education Center
System Administrator, The GC EduNET Project
CBX 034, School of Education
Georgia College, Milledgeville, GA 31061-0490
Voice: (912) 453-5121
via GC EduNET, Georgia's Statewide K-12 Education Network, telnet to:
gcedunet.peachnet.edu
*********************************************************************
=========================================================================
Date: Thu, 5 May 1994 14:51:58 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "arnold v. lesikar" <lesikar@TIGGER.STCLOUD.MSUS.EDU>
Subject: AppleScript1.1 again
I just signed onto the list, so I may have missed the answer to my question
earlier in May. I have read through the March and April digests.
Random House is out of stock on the Applescript Handbook Update Disks, with
no info available as to when the disk will be again in stock, according to
Customer Service. Is the only hope for procuring the Applescript Update now
to lay out $99 or $199 to purchase the Developers Kit? That's a big jump in
price from $4.75 to $99! I'd like of course to procure Frontmost along with
the 1.1 update and whatever other goodies Danny Goodman was providing.
TIA
arn
lesikar@tigger.stcloud.msus.edu
=========================================================================
Date: Thu, 5 May 1994 16:46:08 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Bill Johnston <johnston@ME.UDEL.EDU>
Subject: Re: AppleScript1.1 again
In-Reply-To: <9405052000.AA17820@me.udel.edu>
On Thu, 5 May 1994, arnold v. lesikar wrote:
> I just signed onto the list, so I may have missed the answer to my question
> earlier in May. I have read through the March and April digests.
>
> Random House is out of stock on the Applescript Handbook Update Disks, with
> no info available as to when the disk will be again in stock, according to
> Customer Service. Is the only hope for procuring the Applescript Update now
> to lay out $99 or $199 to purchase the Developers Kit? That's a big jump in
> price from $4.75 to $99! I'd like of course to procure Frontmost along with
> the 1.1 update and whatever other goodies Danny Goodman was providing.
> lesikar@tigger.stcloud.msus.edu
Another route is to buy HyperCard 2.2 for $99 from APDA, or to
update an existing registered copy of HC 2.0.v2 or 2.1 for $89.
Seems to me that the rest of the package in this case is worth
more than what you get with "System 7 Pro".
Can't speak for the Developer's Kit, because I haven't seen it.
I would however be interested in knowing how to get a copy
of a system release that includes Scriptable Finder ... are
any shipping yet?
Bill
-- Bill Johnston (johnston@me.udel.edu)
-- 38 Chambers Street; Newark, DE 19711; (302)368-1949
=========================================================================
Date: Thu, 5 May 1994 14:12:44 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: AppleScript1.1 again
>On Thu, 5 May 1994, arnold v. lesikar wrote:
>Can't speak for the Developer's Kit, because I haven't seen it.
>I would however be interested in knowing how to get a copy
>of a system release that includes Scriptable Finder ... are
>any shipping yet?
The AppleScript Developer's Kit (1.1) contains the Scriptable Finder. That
is, it contains the Finder Scripting Extension, which adds Scriptable
Finder-ness to several existing Finders.
I don't know of other sources, which doesn't mean there aren't other sources.
I expect the extension to be rolled into the Finder in System 7.5, but my
expectations carry NO weight with Apple.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Thu, 5 May 1994 16:29:02 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Rob Dewhirst <robd@FARALLON.COM>
Subject: Scrolling lists/menus in Frontmost
Has anyone tried to get scrolling lists with icons and text in them with
Frontmost? Like Frontmost's own project window?
What about menus with icons in them?
=========================================================================
Date: Thu, 5 May 1994 17:43:20 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "George R. Brown" <gbrown@PARTECH.COM>
Subject: pgmTools problem?
I tried to download the pgmTools.sit.hqx from gaea.kgs.ukans.edu and got an
error from DeHQX saying it couldn't find the start. Is anyone aware of a
problem with this file or am I decoding it wrong?
- gb (george@partech.com)
=========================================================================
Date: Thu, 5 May 1994 16:36:47 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jamie Lawrence <jamiel@SYBASE.COM>
Subject: referencing specific messages in eudora mailboxes
Hi all-
I am writing a script to store old email in a filemaker pro
database. The problem is that I can't figure out how to
reference a specific message in a mailbox.
here is the applicable code-
tell application "Eudora1.4.2"
set num to (count the messages in mailbox "OUT")
set counter to 1
repeat while counter < num
* set ETo to the value of field "To" of message num
* set EFrom to the value of field "From" of message num
* set ESubject to the value of field "Subject" of message num
set EBody to the value of field ""
tell application "FileMaker Pro"
Begin Transaction
Create new Record
[blah blah blah]
I get runtime execution error on the first line of the above,
saying that the mailbox "out" doesn't understand the messages
message. Even tho I can't get there, I am assuming that lines
marked with '*'s above won't work either for the same reason.
Any tips?
thanks-
-j
=========================================================================
Date: Fri, 6 May 1994 12:41:36 +1200
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Norris <michael.norris@STONEBOW.OTAGO.AC.NZ>
Subject: Re: referencing specific messages in eudora mailboxes
>Hi all-
>I am writing a script to store old email in a filemaker pro
>database. The problem is that I can't figure out how to
>reference a specific message in a mailbox.
>here is the applicable code-
>
>tell application "Eudora1.4.2"
>
> set num to (count the messages in mailbox "OUT")
> set counter to 1
> repeat while counter < num
>* set ETo to the value of field "To" of message num
>* set EFrom to the value of field "From" of message num
>* set ESubject to the value of field "Subject" of message num
> set EBody to the value of field ""
> tell application "FileMaker Pro"
> Begin Transaction
> Create new Record
>
>[blah blah blah]
>
>I get runtime execution error on the first line of the above,
>saying that the mailbox "out" doesn't understand the messages
>message. Even tho I can't get there, I am assuming that lines
>marked with '*'s above won't work either for the same reason.
>
>Any tips?
>
>thanks-
>-j
Here's the correct syntax
>tell application "Eudora1.4.2"
>
> set num to (number of message in mailbox "OUT" of mail folder "")
> set counter to 1
> repeat while counter < num
>* set ETo to field "To" of message num of mailbox "OUT" of mail folder
""
>* set EFrom to field "From" of message num of mailbox "OUT" of mail
>folder ""
>* set ESubject to field "Subject" of message num of mailbox "OUT" of
>mail folder ""
> set EBody to field "" of mailbox "OUT" of mail folder ""
> tell application "FileMaker Pro"
> Begin Transaction
> Create new Record
>
Cheers,
Michael Norris,
CAL Consultant,
University of Otago,
PO Box 56,
Dunedin,
New Zealand.
---------------------
Ph:(03) 479-7705
E-Mail: michael.norris@stonebow.otago.ac.nz
=========================================================================
Date: Thu, 5 May 1994 18:09:48 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Allan R. Crump" <jhhw@CRL.COM>
Subject: Re: AppleScript1.1 again
In-Reply-To: <199405052112.AA10460@mail.crl.com>
I received the scriptable finder directly from Apple. If you call them
for technical support and bug them a little, they will e-mail you a copy.
Allan Crump
-------------------------------------------------------------------------
On Thu, 5 May 1994, John W. Baxter wrote:
> >On Thu, 5 May 1994, arnold v. lesikar wrote:
>
> >Can't speak for the Developer's Kit, because I haven't seen it.
> >I would however be interested in knowing how to get a copy
> >of a system release that includes Scriptable Finder ... are
> >any shipping yet?
>
> The AppleScript Developer's Kit (1.1) contains the Scriptable Finder. That
> is, it contains the Finder Scripting Extension, which adds Scriptable
> Finder-ness to several existing Finders.
>
> I don't know of other sources, which doesn't mean there aren't other sources.
>
> I expect the extension to be rolled into the Finder in System 7.5, but my
> expectations carry NO weight with Apple.
>
> --John
>
> --
> jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
> finger me to prove I'm all wet (Port Ludlow rainfall numbers).
>
=========================================================================
Date: Thu, 5 May 1994 21:29:08 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jaime Jouris <jaime@WORLD.STD.COM>
Subject: Re: Scrolling lists/menus in Frontmost
In-Reply-To: <199405052138.AA09060@world.std.com>
We were able to do this using an LDEF that came with WindowScript, a
Hypercard add-on written by the same people who did Frontmost. If you
don't have WindowScript, you might want to contact the company to see if
they can help you out. The authors of Frontmost hang out on AppleLink in
the AppleScript Talk forum, so you might be able to catch them there.
Jaime
On Thu, 5 May 1994, Rob Dewhirst wrote:
> Has anyone tried to get scrolling lists with icons and text in them with
> Frontmost? Like Frontmost's own project window?
>
> What about menus with icons in them?
>
=========================================================================
Date: Thu, 5 May 1994 22:18:15 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: AppleScript1.1 again
In-Reply-To: <no.id> from "John W. Baxter" at May 5, 94 02:12:44 pm
--John W. Baxter wrote:
>
>>On Thu, 5 May 1994, arnold v. lesikar wrote:
>
>>I would however be interested in knowing how to get a copy
>>of a system release that includes Scriptable Finder ... are
>>any shipping yet?
>
>The AppleScript Developer's Kit (1.1) contains the Scriptable Finder. That
>is, it contains the Finder Scripting Extension, which adds Scriptable
>Finder-ness to several existing Finders.
Actually, unless you consider the beta System 7.5 Finder "existing",
the only Finder that Finder Scripting Extension works with is Finder 7.1.3.
>I don't know of other sources, which doesn't mean there aren't other sources.
Aside from the person who said he convinced Apple to send it to him,
the only other way to get the Finder Scripting Extension is to buy the
AppleScript Scripter's Kit. Costs about $130-$150 from MacConnection and
other popular mail-order houses.
>I expect the extension to be rolled into the Finder in System 7.5, but my
>expectations carry NO weight with Apple.
I had though Apple publicly stated that there will be a "scriptable
Finder" in System 7.5?
-Hades
=========================================================================
Date: Thu, 5 May 1994 21:36:14 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: pgmTools problem?
>I tried to download the pgmTools.sit.hqx from gaea.kgs.ukans.edu and got an
>error from DeHQX saying it couldn't find the start. Is anyone aware of a
>problem with this file or am I decoding it wrong?
Anarchie was perfectly happy to download the file for me just now (Thursday
evening left coast time).
--John
This is a mime test. It shouldn't hurt much =3D=AB=B3=B2=BB (checking =
my
LISTSERV options.
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Thu, 5 May 1994 21:45:29 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: AppleScript1.1 again
>> [Quoting me:]
>>The AppleScript Developer's Kit (1.1) contains the Scriptable Finder. That
>>is, it contains the Finder Scripting Extension, which adds Scriptable
>>Finder-ness to several existing Finders.
>
> Actually, unless you consider the beta System 7.5 Finder "existing",
>the only Finder that Finder Scripting Extension works with is Finder 7.1.3.
That's odd...it's doing just fine with Finder 7.1.4, here on my 8100. I
recently claimed that the extension works with Finder 7.1.3 and later, and
was told that it works back to 7.1. That's why I hedged. I don't have the
beta System 7.5 Finder (which I understand multi-hand doesn't need the
extension).
[Quoting me, again:]
>>I expect the extension to be rolled into the Finder in System 7.5, but my
>>expectations carry NO weight with Apple.
>
> I had though Apple publicly stated that there will be a "scriptable
>Finder" in System 7.5?
They've also publicly said 7.5 would be out this spring (since corrected).
Not to mention the New Printing Architecture a couple of years ago (which
seemingly will be out this spring, when QuickDraw GX beats System 7.5 out
the door.
That is why I hedged that part (plus I wasn't sure I remembered Apple as
the direct source for "Scriptable Finder in 7.5"). There's no reason to
expect that it won't be.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Fri, 6 May 1994 01:10:33 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Atul Butte <ATUL@BROWNVM.BROWN.EDU>
Subject: Re: retrieving the hardware address
>Along these lines, how would one obtain the ip of the source of an incoming
>stream?
Use tcp status on the stream. One of the fields in the returned record
is the remote host and port for the other end of the connection...
-- Atul
=========================================================================
Date: Fri, 6 May 1994 12:26:50 +0100
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tony McDonald <Tony.McDonald@NEWCASTLE.AC.UK>
Subject: FrontMost example scripts....
Hi,
I've been 'lurking' on this list for a while and have been impressed with
the knowledge shown (creep creep!) and I think it's at least in part to the
list that I'm slowly (oh sooo slowly) picking up AppleScript.
Soooo, does anyone have any example FrontMost scripts they can share?
getting stuff for that and Eudora is my main aim at the moment. There
doesn't seem to be anything on gaea.
TIA
Tone
ps I'm *really* impressed with those TCP/IP osaxen!
----------------------------------------------- Tony.McDonald@newcastle.ac.uk
Dr Tony McDonald, Apple Systems Advisor,Newcastle University Computing Service
Newcastle Upon Tyne, NE1 7RU. Tel: +44 91 222 8571 Fax: +44 91 222 8765
http://launchy.ncl.ac.uk/Default.html Using Eudora 2.0.2
=========================================================================
Date: Fri, 6 May 1994 08:20:22 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: King Rhoton <king@ACPUB.DUKE.EDU>
Subject: Re: retrieving the hardware address
>>Along these same lines, how about a ip#->name script or app. DNS runs on
>>port 53 (I believe), so I can open a connection, but I can't find
>>documentation for the data I need to pass to our DNServer to get the name
>>back.
>>
>>King Rhoton king@acpub.duke.edu
>
>I will add this to the next version of the TCP/IP Scripting Extension...
Thanks. I've just started looking at this, and it looks like a useful
tool. If I can get the cname of a machine, then I could plug this osax in
and my URL redirection pages would intelligently be able to insert the web
server machine name into the Location: area. That would certainly be worth
the shareware fee!
King Rhoton king@acpub.duke.edu
=========================================================================
Date: Fri, 6 May 1994 08:22:39 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: AppleScript1.1 again
In-Reply-To: <no.id> from "John W. Baxter" at May 5, 94 09:45:29 pm
--John W. Baxter wrote:
>
>--Brian V. Hughes wrote:
>
>> Actually, unless you consider the beta System 7.5 Finder "existing",
>>the only Finder that Finder Scripting Extension works with is Finder 7.1.3.
>
>That's odd...it's doing just fine with Finder 7.1.4, here on my 8100. I
>recently claimed that the extension works with Finder 7.1.3 and later, and
>was told that it works back to 7.1. That's why I hedged. I don't have the
>beta System 7.5 Finder (which I understand multi-hand doesn't need the
>extension).
Now that I have taken the time to actually look, I realize that I
too have Finder 7.1.4 on my 8100. I do know, however, that the Finder
Scripting Extension doesn't work on Finder's that are older than 7.1.3
because they don't contain an AETE resource, which is what FSE patches.
>> I had though Apple publicly stated that there will be a "scriptable
>>Finder" in System 7.5?
>
>They've also publicly said 7.5 would be out this spring (since corrected).
>Not to mention the New Printing Architecture a couple of years ago (which
>seemingly will be out this spring, when QuickDraw GX beats System 7.5 out
>the door.
Ok, that's a good point. I was talking about recent stuff that I was
told at a PowerPC demo. Apple stated that System 7.5 would be released
in the Summer and would contain the Drag Manager, the Thread Manager,
and a full scriptable Finder.
>That is why I hedged that part (plus I wasn't sure I remembered Apple as
>the direct source for "Scriptable Finder in 7.5"). There's no reason to
>expect that it won't be.
When it comes to talking about things that don't actually exist yet
(i.e. System 7.5) hedging one's bets is always a good idea.
-Hades
=========================================================================
Date: Fri, 6 May 1994 10:36:05 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Eddie Lutz <Edward_M._Lutz@POL.COM>
Organization: Productivity OnLine 513-333-3111
Subject: Re: Two short Finder scripts
>When I try to run these from OSA Menu, I get an out of memory error
>(-108). They work if I launch them directly from the Finder. (Finder
>7.1.3 with 32 meg). What am I missing?
I'm experiencing the same problem. System 7.1, 8 meg + Ram Doubler.
---------------------------------------------------------------------
Edward M. Lutz, Jr. Internet: edward_m_lutz@pol.com
Exodus Software elutz@tso.uc.edu
(513) 522-0011
(513) 522-3958 FAX AppleLink: EXODUS
=========================================================================
Date: Fri, 6 May 1994 08:12:51 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Anthony Yen <tyen@NETCOM.COM>
Subject: Excel and AppleScript/AppleEvents
Would I be able to drive Excel using either AppleScript or AppleEvents
to create graphs and then export the graphs as PICTs into another
application (specifically 4th Dimension)?
-- Anthony Yen <tyen@netcom.com> Austin, Texas, USA
=========================================================================
Date: Fri, 6 May 1994 10:50:39 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Leonard Rosenthol <leonardr@NETCOM.COM>
Subject: Re: AppleScript1.1 again
For the record, Finder 7.1.2, 7.1.3, 7.1.4 and 7.5 are all the EXACT SAME
FINDER (with the possible exception of a bug fix or two) - All scripting is
handled by the "extension".
Leonard
-----------------------------------------------------------------------------
Leonard Rosenthol Internet: leonardr@netcom.com
Director of Advanced Technology AppleLink: MACgician
Aladdin Systems, Inc. GEnie: MACgician
=========================================================================
Date: Fri, 6 May 1994 15:18:30 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Ernest A. Freund" <freundea@LINC.CIS.UPENN.EDU>
Subject: newbie trying to send to Macintosh Common Lisp
I have been trying to use AppleScripts to communicate with an AI program
written in MCL. My scripts are successful in opening and quitting the
program using
tell application "MCL progname"
(quit)
end tell -- application "MCL progname"
However, this is the extent of my accomplishments, and really isn't too
helpful. The program has handlers for interpreting MCL procedure calls
send in AE messages, but I was hoping to get it to recognize AS's.
What would be a good way to do this? Does an aete resource need to be
created? an XCMD?
I also was trying to send MCL code to it. MCL uses the prefix notation
for arithmetic, and commands are contained in parentheses.
eg. (print ( + 2 1))
Script Editor gives error messages when checking syntax. It wants to put
these expressions in infix notation.
I have access to Tao of ... and Goodman's ...
My copy of Inside Mac Interapp com is in the mail.
Where should I go from here?
thanks,
eaf
--
Ernest A. Freund freundea@linc.cis.upenn.edu
"When the going gets weird, the weird turn pro." - Raoul Duke
=========================================================================
Date: Fri, 6 May 1994 12:30:39 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Edmund Lai <lai@APPLE.COM>
Subject: BBEdit 3.0 supports OSA languages
The following is a press release from Bare Bones Software. The statment
that will be of particular interest to this group is
"Other significant enhancements include support for user scripting via
AppleScript, Frontier, or any other OSA-compliant scripting system"
***********************************************************************
April 30, 1994
For Immediate Release
Contact:
Rich Siegel
Bare Bones Software
1 Larkspur Way #4
Natick, MA 01760
Phone: (508) 651-3561
Fax: (508) 651-7584
Internet: bbedit@world.std.com
CIS: 73051,3255
AppleLink: BARE.BONES
Bare Bones Software announces BBEdit 3.0: High Performance Text Editor
for Power Macintosh(R)
Natick, MA -- Bare Bones Software, publisher of the premier Macintosh
text editor, BBEdit 2.5, is readying a new release of BBEdit with
extended functionality, including support for Power Macintosh(R) systems.
BBEdit 3.0 will take advantage of native PowerPC(TM) code to greatly
enhance the speed of common operations such as loading and saving files,
and text editing, searching and transformation.
In addition to support for the newest Macintosh line, BBEdit 3.0 will
feature a unique multi-file Compare facility, which can compare
individual files, folders, or project documents for differences. When
comparing folders or projects, BBEdit will display files which are
common to both folders or projects, as well as files unique to each
folder or project. Common files can be directly compared for
differences. As the result of an alliance with SciComp Software, BBEdit
3.0 will also feature integrated PopupFuncs(TM) technology, which allows
quick access to C, C++, or Pascal constructs defined in a source file
via a popup menu in that file's window.
Other significant enhancements include support for user scripting via
AppleScript, Frontier, or any other OSA-compliant scripting system, use
of Macintosh Drag and Drop in the user interface and for text editing,
and support for the AOCE "Standard Mail Package", so that users can
compose, send, and read PowerTalk(R) mail messages from within BBEdit.
BBEdit 3.0 also features a number of user-interface enhancements,
included in direct response to user comments and suggestions. In order
to smooth the transition from other text-editing products to BBEdit,
Bare Bones Software has included a number of new text transformations,
including line sorting, generation of C function prototypes, line
numbering, and organization of delimited words into rows and columns.
BBEdit 3.0 is slated to ship in early June. An upgrade policy is in
place for owners of the current 2.5 release, and customers who
purchase BBEdit 2.5 after May 1, 1994 will be eligible for a free
upgrade. (A coupon will be included in packages which fill orders
entered after May 1.)
--
Bare Bones Software Internet: bbedit@world.std.com
%====================================================================%
Rich Siegel Patrick Woolsey
Principal Software Designer Director of Quality Assurance
***********************************************************************
/* Disclaimer: All statments and opinions expressed are my own */
/* Edmund K. Lai */
/* Apple Computer, MS303-3A */
/* 20525 Mariani Ave, */
/* Cupertino, CA 95014 */
/* (408)974-6272 */
zW@h9cOi
=========================================================================
Date: Fri, 6 May 1994 16:09:07 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "George R. Brown" <gbrown@PARTECH.COM>
Subject: Problem with Script Tools 1.3
In looking at the Examples folder of the Script Tools 1.3 set, I got an
error trying to compile the file "File IO Example", the line below (with AS
1.1):
set newFilePath to (folder returned of newFile as string) &
(name returned of newFile)
^^^^^^^^
Expected "," but found identifier.
I put the script extensions from the Additions and Libraries folders into
the System Folder:Extensions:Scripting Extensions folder... Is there
something I'm missing??
- gb (george@partech.com)
=========================================================================
Date: Fri, 6 May 1994 17:11:00 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Comments: Warning -- original Sender: tag was ross@BNR.CA
From: ab026@FREENET.CARLETON.CA
Subject: Re: AppleScript1.1 again
Leonard Rosenthol writes:
>For the record, Finder 7.1.2, 7.1.3, 7.1.4 and 7.5 are all the EXACT SAME
>FINDER (with the possible exception of a bug fix or two) - All scripting is
>handled by the "extension".
If you have Finder 7.1.2 or later, and don't want to spend $130-$150 on the
AppleScript Scripter's Kit to get a copy of Finder Scripting Extension, you
can control your Finder through its menu commands using my (free) Menu
Events extension and scripting addition. I think you should consider Jon's
Commands first, though, since it does similar things in a more natural way.
Because Menu Events is implemented as an extension, the target machine does
not need AppleScript installed for Menu Events to work. For example:
tell application "Finder" of machine "Chosen Victim" of zone "Oz"
Select Menu Item menu id 129 menu item id 5
end tell
Menu Events and the other relevant AWOL Utilities are available from
ftp://gaea.kgs.ukans.edu/applescript/addons
Ross Brown - AWOL Software Productions
PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
publisher of AWOL Utilities - "the best deal in freeware!"
ab026@freenet.carleton.ca
=========================================================================
Date: Fri, 6 May 1994 19:52:49 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Victor O Jimenez <victoroj@AOL.COM>
Subject: ERROR
I keep getting a type 1 error when i try to do certain scripting
things...like save a script as an aplication.
I am new to AppleScript Language......so any help would be nice
=========================================================================
Date: Fri, 6 May 1994 16:54:29 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Ray <daver@NETCOM.COM>
Subject: Re: Problem with Script Tools 1.3
"George R. Brown" <gbrown@PARTECH.COM> wrote:
>set newFilePath to (folder returned of newFile as string) &
> (name returned of newFile)
> ^^^^^^^^
> Expected "," but found identifier.
I assume this is preceeded with:
set newFile to (choose new file)
The following will work:
set newFilePath to (folder returned of newFile as string) &
(filename returned of newFile)
^^^^^^^^
In general, a good way of debugging this kind of thing is to open a
new window in script editor and type:
return (choose new file)
This will show you the syntax that returns from 'choose new file', which
is a list of three items: filename returned (string), replacing (boolean),
and folder returned (alias).
-Dave
=========================================================================
Date: Fri, 6 May 1994 18:06:44 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Edmund Lai <lai@APPLE.COM>
Subject: A message box script (was Re: AS Interpreter)
Here is a simple script to give you a modal message box for any application.
It is meant to be used Leonard Rosenthol's OSA Menu or other script menu
extension. Compile the script and put it into OSA Menu's universal script
folder and you can use it anytime. Result is returned to the application's
current selection if that application supports set selection (e.g.
Scriptable text editor), otherwise result go to a dialog box. It is
addressed to the current application. For example here are some statements
that you can do to the STE.
1+1
Beep 3
current date as string
word 4 of window 1
Here is the script
set hasAnswer to true
set userScript to text returned of (display dialog "Enter the script"
default answer "")
try
set ans to (run script userScript)
on error errText number errNum
set hasAnswer to false
if errNum =82 -2763 then
display dialog errText buttons "OK"
end if
end try
if hasAnswer then
try
set selection to ans
on error
display dialog ans buttons "OK"
end try
end if
/* Disclaimer: All statments and opinions expressed are my own */
/* Edmund K. Lai */
/* Apple Computer, MS303-3A */
/* 20525 Mariani Ave, */
/* Cupertino, CA 95014 */
/* (408)974-6272 */
zW@h9cOi
=========================================================================
Date: Fri, 6 May 1994 19:59:07 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: newbie trying to send to Macintosh Common Lisp
>I have been trying to use AppleScripts to communicate with an AI program
>written in MCL. My scripts are successful in opening and quitting the
>program using
>
> tell application "MCL progname"
>
> (quit)
>
> end tell -- application "MCL progname"
>
>However, this is the extent of my accomplishments, and really isn't too
>helpful. The program has handlers for interpreting MCL procedure calls
>send in AE messages, but I was hoping to get it to recognize AS's.
>
>What would be a good way to do this? Does an aete resource need to be
>created? an XCMD?
While it is possible to use AppleScript to send events which are not
described in an application's 'aete' resource, you don't want to...it is
ugly and error-prone. It is much easier to prepare your 'aete' resource
and include it in your application. Or use UserLand Frontier rather than
AppleScript, which uses a table of verbs you write in Frontier to define
the events. [Given an 'aete', Frontier can make a good start at generating
the table for you.]
MPW can also be used to send arbitrary events, with the help of a handy
tool (whose use I don't know).
>I also was trying to send MCL code to it. MCL uses the prefix notation
>for arithmetic, and commands are contained in parentheses.
>
>eg. (print ( + 2 1))
>
>Script Editor gives error messages when checking syntax. It wants to put
>these expressions in infix notation.
You will probably want to send your MCL source code as a string. Like this:
"(print ( + 2 1))"
If you do that, Script Editor will leave it alone. It seems likely that
your handler in your application would prefer to receive a string, anyhow.
There's a standard event set aside for this job...in AppleScript it would
look like this:
do script "(print ( + 2 1))"
The event class is 'misc', and the event id is 'dosc'. According to the AE
Registry, the direct object can be a string which is the script to execute,
or an alias to a file which contains the text to execute.
Better applications (QuarkXPress, for one) have recently extended this (a
good idea) so that a second parameter if present indicates a scripting
language to use in compiling the text found in the first parameter (so that
instead of MCL code, you could compile and execute AppleScript, Frontier,
QuikScript, or other scripting source code). XPress also allows a
pre-compiled Open Scripting Architecture script to be sent, and executes
that.
All those additions to do script sound tricky, but can be done with very
little code.
---John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Sat, 7 May 1994 08:49:16 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: Finder Scripting Extension
> Now that I have taken the time to actually look, I realize that I
>too have Finder 7.1.4 on my 8100. I do know, however, that the Finder
>Scripting Extension doesn't work on Finder's that are older than 7.1.3
>because they don't contain an AETE resource, which is what FSE patches.
Wrongo, Mary Lou.
The Finder Scripting Extension was written to work with the Bungee Finder,
which was the reference Finder for a number of system extensions, such as
AOCE (PowerTalk) and QuickDraw GX. Finders prior to Bungee required a
coordinated set of extensions (Network, File Sharing, etc.) since each
extension had to know about specific entry points in the Finder which moved
over several releases. Bungee fixed this (among other things), probably by
standardizing the entry points in a jump table. At any rate, Greg Anderson
(principle author of FSE & AutoGuest) told me (and others) that he could
make it work with 7.0 and 7.01 Finders too, presumably because their entry
points were known and immutable. I haven't tested this theory though,
since I haven't used either of them for quite some time (since 7.1 to be
precise).
So, Bungee Finder is 7.1.3 on. I don't know if it will have all the
extensions rolled into one file for 7.5, but I doubt it. It will more
likely ship with the extension, just like it ships with the Network and
other extensions.
> When it comes to talking about things that don't actually exist yet
>(i.e. System 7.5) hedging one's bets is always a good idea.
Hear hear.
Jon
PS
> return (choose new file)
The return () is unneeded. Every AppleScript statement has a value and the
last statement is the value of the function. So use:
choose new file
instead.
=========================================================================
Date: Sat, 7 May 1994 11:52:19 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Will Cate <prubank!qm!wcate@UUNET.UU.NET>
Subject: Re: FWD>BBEdit 3.0 supports
Reply to: RE>FWD>BBEdit 3.0 supports OSA lan
What will be the "new purchase" price? I'd like to order 5 copies ASAP.
Thanks.
Will Cate, Programming Manager
The Prudential Bank
wcate@prubank.com
=========================================================================
Date: Sat, 7 May 1994 13:07:59 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kelly A Campbell <camel@CIS.KSU.EDU>
Subject: Refferencing an Application by its id type
Does anyone know how to refer to an application by its 4 letter type code?
Such as instead of tell application "Scriptable Text Editor"
is there a way to do something like tell application quil ....
(quil is the creator code for the text editor)
I'm wondering about this because the name of the app could be changed, and
I think this would be a better way to refer to an application, plus
you wouldn't have to know exactly where on the disk the application is.
Thanks,
Kelly
--
,---------------------------------------------------------.
| Kelly A. Campbell | Kansas State University |
| camk@ksu.ksu.edu | Student Publications |
| camel@cis.ksu.edu | Macintosh Tech Support |
`---------------------------------------------------------'
=========================================================================
Date: Sat, 7 May 1994 17:53:01 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Refferencing an Application by its id type
>Does anyone know how to refer to an application by its 4 letter type code?
>Such as instead of tell application "Scriptable Text Editor"
>is there a way to do something like tell application quil ....
>(quil is the creator code for the text editor)
>
>I'm wondering about this because the name of the app could be changed, and
>I think this would be a better way to refer to an application, plus
>you wouldn't have to know exactly where on the disk the application is.
As long as you are dealing with compiled scripts, don't worry too much
about the name issue. AppleScript in general (and perhaps Script Editor
even more so, perhaps not) works very hard (too hard in some cases) to keep
up with you when you make changes.
Try this experiment. Compile and save (as an application) a script for
"Scriptable Text Editor". Make things harder: quit Script Editor. Rename
"Scriptable Text Editor" to its right and proper name (which Apple seems
not to have used for trademark reasons): "Quill". Make things harder
still: restart your Mac.
Now run that script in Script Editor. It will run fine. Open the script
in Script Editor. It will refer to application "Quill". Moving the app
shouldn't hurt much, either, unless you move it cross volume...Script
Editor may ask for help in that case if the app isn't running when it first
needs to know.
[I said that something AppleScript works too hard at this based on a
sequence like this: have an app running under the Think Debugger. Write a
script which addresses it by name. Close the script and quit Script
Edtior. Quit the application and TPM (and the debugger). Open the script.
[Don't have anything important running on your Mac when you do this.] If
I remember the sequence correctly, the result is that AppleScript attempts
to launch the TPM project file as if it were an application, which results
in a crash.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Sun, 8 May 1994 00:04:58 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Frontier 3.03 updater
Just as Doug Baron promised, there is a 3.03 version of Frontier
available. You'll find it on gaea in
ftp://gaea.kgs.ukans.edu/frontier/FromUserland/303UpgradInstaller.hqx
I've included a portion of the readme file so you can see what
has changed. Enjoy.
pf
Frontier 3.0.3 Upgrader
-----------------------
This package upgrades UserLand Frontier 3.0, 3.0.1 or 3.0.2 to version
3.0.3. If you have Frontier 2.x and would like to upgrade to 3.0.3, send
an email message to Carolyn Franz at 76703,4047 for ordering info, or
read UPGRAD.TXT in this library.
There are no new features in 3.0.3; it fixes an object specifier problem
introduced in 3.0.2 and includes the latest Thread Manager extension from
Apple. Version 3.0.2 added expanded support of array operations, while
version 3.0.1 improved compatibility with HyperCard 2.2 and RAM Doubler
1.0. All other changes since 3.0 address problems and bugs reported by
users.
Please review the list of changes before installing 3.0.3. If you're not
experiencing any problems with Frontier, you may not need to install this
update. However, if you use scripts created by other users, upgrading is
recommended to assure compatibility.
Changes in 3.0.3
----------------
with statement
* Changed the scoping rules for object specifiers used in with
statements. Version 3.0.2 prevented object specifiers in with statements
from unexpectedly affecting specifiers in externally-called scripts. But
in some cases, in particular when coercing a string4 value to be an
object specifier (for a property), it is desirable and necessary to take
the with statement of the calling script into account. Version 3.0.3
handles these cases separately to achieve the expected behavior. Object
model scripts that began to generate errors after upgrading to 3.0.2
should work again with 3.0.3.
Thread Manager 2.0.1
* Apple recently released a new version of the Thread Manager that fixes
a QuickDraw bug on some machines in low stack space conditions, and an
occasional crash when quitting. The new version is included in this
package.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry Cadence Design Systems pfterry@lks.csi.com +1 913 841 1283
=========================================================================
Date: Sun, 8 May 1994 15:56:15 +0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Peter N Lewis <peter.lewis@INFO.CURTIN.EDU.AU>
Subject: PowerMac and the AS 1.1 file access osax
Hi all,
I just tried my download files script on my PowerMac and exploded big time.
I narrowed it down to just this:
set umichaddr to "archie.au:/micros/mac/umich/"
set infomacaddr to "archie.au:/micros/mac/info-mac/"
set theinput to "rocky:desktop folder:download"
set thedata to ""
set rn to open for access file theinput with write permission
try
set thedata to read rn
on error
end try
close access rn
Basically, it looks very much like the file access stuff is broken on the
PowerMac. I didn't narrow it down any further (I was kind of pissed off
with it after spending several hours reinstalling AS a dozen times).
Anyway, if anyone would like to confirm this as failing, so people know to
stay awya from it, that'd be good. But it totally trashes my mac (reboot
time), so attempt with caution.
Peter.
PS: I'm not on this mailing list, but I have friends who watch for relevent
stuff, so they will forward anything useful to me.
Peter N Lewis <peter.lewis@info.curtin.edu.au> Ph: +61 9 368 2055
=========================================================================
Date: Mon, 9 May 1994 15:01:43 +0100
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Marco Strehler <strehler@FVMED.UNIZH.CH>
Subject: Eudora: strange AppleScript behavior?
Eudora has a strange AppleScript behavior:
"MailboxType", "WasteSpace" and "Name" are all read only properties of the
Class "Mailbox" (according the aete resource). But the Property "Name"
doesn't work.
I'm using AS 1.0, Eudora 1.4.1 and System 7.1.
Can somebody give me a hint?
tell application "Eudora1.4.1"
get MailboxType of first Mailbox of Mail Folder ""
-- this works: result 6220 (the IN-Mailbox)
get WasteSpace of first Mailbox of Mail Folder ""
-- this works: an integer is returned
get Name of first Mailbox of Mail Folder ""
-- THIS DOESN'T WORK. Error text:
-- << Eudora1.4.1 got an error:
-- Can't get Name of Mailbox 1 of Mail Folder \"\". >>
end tell
*
* Marco Strehler, Im Dreispitz 21, 8152 Glattbrugg (Switzerland)
* ++41 (0)1 810 27 03
* strehler@fvmed.unizh.ch
*
=========================================================================
Date: Sun, 8 May 1994 09:11:09 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Eudora: strange AppleScript behavior?
>Eudora has a strange AppleScript behavior:
>"MailboxType", "WasteSpace" and "Name" are all read only properties of the
>Class "Mailbox" (according the aete resource). But the Property "Name"
>doesn't work.
>I'm using AS 1.0, Eudora 1.4.1 and System 7.1.
>
>Can somebody give me a hint?
>
>tell application "Eudora1.4.1"
>
> get MailboxType of first Mailbox of Mail Folder ""
> -- this works: result 6220 (the IN-Mailbox)
> get WasteSpace of first Mailbox of Mail Folder ""
> -- this works: an integer is returned
> get Name of first Mailbox of Mail Folder ""
> -- THIS DOESN'T WORK. Error text:
> -- << Eudora1.4.1 got an error:
> -- Can't get Name of Mailbox 1 of Mail Folder \"\". >>
>
>end tell
I see the same effect with Eudora 2.0.2. However, the Apple event handling
in Eudora seems to be fine, in that the equivalent Frontier code:
with objectModel, eudora, eventInfo
core.get (id, mailfolder[""].mailbox[1].name)
correctly produces the name "In". I'll have a look at the 'aete' resource
in Eudora (not used by Frontier).
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Sun, 8 May 1994 10:13:34 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Eudora: strange AppleScript behavior?
>Eudora has a strange AppleScript behavior:
>"MailboxType", "WasteSpace" and "Name" are all read only properties of the
>Class "Mailbox" (according the aete resource). But the Property "Name"
>doesn't work.
>I'm using AS 1.0, Eudora 1.4.1 and System 7.1.
>
>Can somebody give me a hint?
>
>tell application "Eudora1.4.1"
>
> get MailboxType of first Mailbox of Mail Folder ""
> -- this works: result 6220 (the IN-Mailbox)
> get WasteSpace of first Mailbox of Mail Folder ""
> -- this works: an integer is returned
> get Name of first Mailbox of Mail Folder ""
> -- THIS DOESN'T WORK. Error text:
> -- << Eudora1.4.1 got an error:
> -- Can't get Name of Mailbox 1 of Mail Folder \"\". >>
>
>end tell
As said before, the equivalent Frontier script works. That led me to look
into Eudora's 'aete' resource ("Dictionary").
And I found that the Name property for a mailbox is 'pNam' rather than
'pnam' which (a) is the Registry definition, and (b) is what Frontier uses
(because of how the objectModel table in Frontier is set up). When I
induced Frontier to ask for the 'pNam' property of a mailbox, the same
error was returned as AppleScript receives.
So...I changed [in Eudora's 'aete' resource] the code for the Name property
of a mailbox to 'pnam' and...
there was no change in behavior.
I went back and changed the Name property of EVERY class in Eudora which
has one from 'pNam' to 'pnam' and...
get Name of first Mailbox of Mail Folder ""
now works fine.
Conclusions:
1. Eudora's 'aete' needs to be changed as above.
I will not post the changed 'aete', since (a) I don't have permission,
and (b) I don't know what versions of Eudora other than 2.0.2 it would
apply to. Given the aete editor stack (b4 is the current version) or
another suitable tool (MPW, Resourcerer, ...) you can make the change
yourself.
2. AppleScript 1.1 appears to get confused if the same property name has
more than one code value in a given 'aete'. When designing applications,
don't do that. [I suspect that if I had changed the Name property of only
the first class which has one...or only the last class...that would have
been sufficient.]
I'll await Jon Pugh's comment before I send off a report to APPLE.BUGS,
since there may well have been a conscious decision to design AppleScript
this way.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Sun, 8 May 1994 10:59:24 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: PowerMac and the AS 1.1 file access osax
>I just tried my download files script on my PowerMac and exploded big time.
>I narrowed it down to just this:
>
>set umichaddr to "archie.au:/micros/mac/umich/"
>set infomacaddr to "archie.au:/micros/mac/info-mac/"
>set theinput to "rocky:desktop folder:download"
>
>set thedata to ""
>set rn to open for access file theinput with write permission
>try
> set thedata to read rn
>on error
>end try
>close access rn
>
>Basically, it looks very much like the file access stuff is broken on the
>PowerMac. I didn't narrow it down any further (I was kind of pissed off
>with it after spending several hours reinstalling AS a dozen times).
>
>Anyway, if anyone would like to confirm this as failing, so people know to
>stay awya from it, that'd be good. But it totally trashes my mac (reboot
>time), so attempt with caution.
Hi, Peter....
Yes...the file access Scripting Addition (from Apple) seems to be broken
on my 8100, also. I now have a new folder, named "Scripting Additions
(broken)". Thanks for the report...I wouldn't have noticed, since I do
complex things in Frontier rather than AppleScript.
I left out the Anarchie usage, using a script like this
set theinput to "Vashon:desktop folder:C programming positions"
set thedata to ""
set rn to open for access file theinput with write permission
try
set thedata to read rn
on error
beep
end try
close access rn
the data
In two runs, the first initially appeared to go OK, but left a time bomb
behind (I had not noticed a leading space on the file name, and a new empty
file appeared...Finder crashed when I tried to trash that file). The
second run left me with an all-gray screen, and the interrupt switch
non-working...the restart switch did its job. No damage done.
Time for a love letter to APPLE.BUGS, I guess (not from me, though), unless
someone who has purchased the right to talk to whatever DTS has been
renamed want to pursue it.
--John (who guesses that we can eliminate the backward direction of the
Coriolis effect at Peter's machine as part of the problem)
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Sun, 8 May 1994 21:45:51 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: osaxen and aetes
>2. AppleScript 1.1 appears to get confused if the same property name has
>more than one code value in a given 'aete'. When designing applications,
>don't do that. [I suspect that if I had changed the Name property of only
>the first class which has one...or only the last class...that would have
>been sufficient.]
>
>I'll await Jon Pugh's comment before I send off a report to APPLE.BUGS,
>since there may well have been a conscious decision to design AppleScript
>this way.
I don't really know if it was so much intentional as just the way it worked
out given the schedule pressure.
John's right though. All properties are thrown into a bucket and
AppleScript allows you to use any property with any object. It does no
checking. I don't recall if it uses the first or the last occurance, but
that behavior shouldn't be relied on anyhow. If you are designing an aete,
you should never have a term with more than 1 code or a code that is used
for more than 1 term. You can have the same term in different places
(notably, properties and keywords), but they should match exactly.
As for scope, properties are global to the application's tell block.
Events and keywords are scoped only to the event they are in.
As for Eudora's aete error, this is the reason you should do your aete in
Rez and use the same constants that you use in your code. That way they
match and this kind of bug doesn't occur. I know Rez isn't pretty, but if
you can code C then you can write Rez. Don't be a sissy. ;)
>>Basically, it looks very much like the file access stuff is broken on the
>>PowerMac. I didn't narrow it down any further (I was kind of pissed off
>>with it after spending several hours reinstalling AS a dozen times).
>>
>>Anyway, if anyone would like to confirm this as failing, so people know to
>>stay awya from it, that'd be good. But it totally trashes my mac (reboot
>>time), so attempt with caution.
>
>Hi, Peter....
> Yes...the file access Scripting Addition (from Apple) seems to be broken
>on my 8100, also. I now have a new folder, named "Scripting Additions
>(broken)". Thanks for the report...I wouldn't have noticed, since I do
>complex things in Frontier rather than AppleScript.
Apparently there is an unoffical bug fix coming up which will repair some
of the problems discovered in the various osaxen. I don't know if this one
is fixed or even known, but the few I have found have already been fixed.
I also don't know what the schedule of this release is, but I'll check on
that too.
Jon
=========================================================================
Date: Sun, 8 May 1994 21:59:22 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: Referencing an Application by its id type
>As long as you are dealing with compiled scripts, don't worry too much
>about the name issue. AppleScript in general (and perhaps Script Editor
>even more so, perhaps not) works very hard (too hard in some cases) to keep
>up with you when you make changes.
Actually, this is all done by the Alias Manager. When you choose an
application in a tell statement, AppleScript simply saves an alias. That
explains all the capabilities and limitations associated with moving
scripts to other computers. They behave just like aliases do, except that
when AppleScript can't resolve an alias it looks for a running process and
if it can't find the right one then it asks the user where the application
is.
That means that you can avoid being asked by simply making sure the needed
programs are already running before you open or run a script.
Jon
=========================================================================
Date: Sun, 8 May 1994 22:39:43 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Referencing an Application by its id type
>>As long as you are dealing with compiled scripts, don't worry too much
>>about the name issue. AppleScript in general (and perhaps Script Editor
>>even more so, perhaps not) works very hard (too hard in some cases) to keep
>>up with you when you make changes.
>
>Actually, this is all done by the Alias Manager. When you choose an
>application in a tell statement, AppleScript simply saves an alias. That
>explains all the capabilities and limitations associated with moving
>scripts to other computers. They behave just like aliases do, except that
>when AppleScript can't resolve an alias it looks for a running process and
>if it can't find the right one then it asks the user where the application
>is.
>
>That means that you can avoid being asked by simply making sure the needed
>programs are already running before you open or run a script.
>
Jon,
That's essentially what I thought, except that it doesn't quite explain
(to me) this sequence:
1. Compile a script while program Proj.pi is running under the Think debugger.
2. With the project not running, try to open/run (I don' recall which...I
can look up the message traffic if it actually matters) the script. Crash,
and it became clear (after some playing with MacsBug, that the project file
had been dealt with as if it were an application.
3. [This is the part that suggests that the signature is kept around
somewhere]. Open/run the script again, and Think Project Manager is
launched. The only reason I can see for THAT effect is that they share the
creator 'KAHL'.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Mon, 9 May 1994 08:15:49 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Graham Heyes <heyes@DAHP1.CEBAF.GOV>
Subject: Making an app scriptable...
Hi folks,
I am trying to write a simple scriptable application and falling down
somewhere along the way. I wrote an application "Fred" which is set up to
accept
apple events. The idea is that a little window shows a picture of a little
man/woman who's expression and gestures can be changed from a script.
I can send an event by using the script
Which works perfectly and makes the little character wave. Now I have it all
working I tried to write an aete resource to make the think scriptable. I used
the AETEEditor hypercard stack, made a suite called GEST then added in a class
GEST and an event wave. When I output the resource and use the script editor to
look at the dictionary of "Fred" I see all my additions but when I change the
script to
tell application "fred"
activate
wave
end tell
not a lot happens except the dreaded "applicatiopn Fred does not understand
wave..." dialog pops up. I tried a few obvious things like swapping the event
and class IDs in case I had them the wrong way round but that has no effect.
Anyone got any idea what is going wrong?
Graham
-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-
Graham Heyes,CEBAF,12000 Jefferson Ave,Newport News,VA 23606,Tel:(804) 249-7030
=========================================================================
Date: Mon, 9 May 1994 13:05:37 +0000
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Borre Ludvigsen <borrel@MASHALLAH.LUDVIGSEN.DHHALDEN.NO>
Subject: Webstat
Has anyone been successful in starting the Webstat application and picking
up its html results?
- Barre Ludvigsen
=========================================================================
Date: Mon, 9 May 1994 09:10:37 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: John Schettino <js12@GTE.COM>
Subject: Re: Eudora: strange AppleScript behavior?
>Eudora has a strange AppleScript behavior:
>"MailboxType", "WasteSpace" and "Name" are all read only properties of the
>Class "Mailbox" (according the aete resource). But the Property "Name"
>doesn't work.
>I'm using AS 1.0, Eudora 1.4.1 and System 7.1.
>
>Can somebody give me a hint?
>
>tell application "Eudora1.4.1"
>
> get MailboxType of first Mailbox of Mail Folder ""
> -- this works: result 6220 (the IN-Mailbox)
> get WasteSpace of first Mailbox of Mail Folder ""
> -- this works: an integer is returned
> get Name of first Mailbox of Mail Folder ""
> -- THIS DOESN'T WORK. Error text:
> -- << Eudora1.4.1 got an error:
> -- Can't get Name of Mailbox 1 of Mail Folder \"\". >>
>
>end tell
>
I use this (with Eudora 2.0.2, but it should work for you!)
-- get list of mailbox names
set mblist to {}
set AppleScript's text item delimiters to {":"}
tell application "Eudora 2.0.2"
activate
-- get the name of each of the mailboxes I have in the system
repeat with idx from 1 to count mailbox of mail folder ""
set mbname to (fileSpec of mailbox idx of mail folder "")
set end of mblist to (last text item of (mbname as string))
end repeat
end tell
mblist -- just to see if it worked
- john
-----------------------------------------
js12@gte.com GTE Laboratories
John Schettino Waltham, MA
=========================================================================
Date: Mon, 9 May 1994 11:40:34 EST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Andrew Brennan, LRC Manager" <brennan@HAL.HAHNEMANN.EDU>
Subject: Re: AppleScript1.1 again
>
> >I don't know of other sources, which doesn't mean there aren't other
sources.
>
> Aside from the person who said he convinced Apple to send it to him,
> the only other way to get the Finder Scripting Extension is to buy the
> AppleScript Scripter's Kit. Costs about $130-$150 from MacConnection and
> other popular mail-order houses.
>
While it doesn't include the Finder Scripting Extension, MacHTTP 1.3 is
currently on the net with AppleScript 1.1 included. Try this URL :
ftp://www.uth.tmc.edu/public/mac/MacHTTP/machttp.sit.hqx
I'm not exactly sure how the legal aspects of this work, but it's one
way to upgrade ...
andrew. (brennan@hal.hahnemann.edu)
<A HREF=http://ubu.hahnemann.edu/misc/aab.html>andrew.</A>
=========================================================================
Date: Mon, 9 May 1994 12:26:17 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Andy J. Williams" <Andy.J.Williams@DARTMOUTH.EDU>
Subject: Easy View
Has anyone tried making an Easy View view for the digests of this list? If
so, drop me or Fred a note so that we can put it up on gaea for everyone's
benefit.
Thanks
-A
=========================================================================
Date: Mon, 9 May 1994 13:53:33 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: digests in Easy View format
Several people have expressed an interest in the digests in Easy View format.
Brian Hughes has been good enough to provide us with his copy. You'll find it
in
ftp://gaea.kgs.ukans.edu/applescript/docs/macscrpt_digest_ev.hqx
Many thanks, Brian!
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry Cadence Design Systems pfterry@lks.csi.com +1 913 841 1283
=========================================================================
Date: Mon, 9 May 1994 15:49:11 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: digests in Easy View format
In-Reply-To: <no.id> from "Fred Terry" at May 9, 94 01:53:33 pm
--Fred Terry wrote:
>
>Several people have expressed an interest in the digests in Easy View format.
>Brian Hughes has been good enough to provide us with his copy. You'll find it
>in
>
>ftp://gaea.kgs.ukans.edu/applescript/docs/macscrpt_digest_ev.hqx
>
>Many thanks, Brian!
You're welcome, of course. For those of you who like to do things on
your own, here's how to do this: First, you need to create an Easy View
file that uses the Mail format (you can just use a copy of the Internet
Mail file that comes with Easy View, this is what I did ;), open the
file up, and choose Preferences from the Edit menu while you hold down
the option key. Then all you have to do is chagen the "Mail Start" field
from "From" to "Date:" (without the quotes of course). Then save the
easy view file and you're done. Pretty simple, huh?
You can also change the chapter display options while you have the
Preferences dialog open. The file that I uploaded has been set to
"Sender*Subject" because this is what I like to use. There are a couple
of other choices for your own personal tastes. One note: if you make a
change to this option with a file already idexed by Easy View, you will
have to re-index the file to see the change. To do this, all you do is
go to the Modify View item under the File menu. When the dialog box
comes up, you move all indexed files out of the View, and then, move
them back in.
-Hades
=========================================================================
Date: Mon, 9 May 1994 14:18:06 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Robert Mark <rmark@ISDMNL.WR.USGS.GOV>
Subject: Re: digests in Easy View format
>--Fred Terry wrote:
>>
>>Several people have expressed an interest in the digests in Easy View format.
>>Brian Hughes has been good enough to provide us with his copy. You'll find it
>>in
>>
>>ftp://gaea.kgs.ukans.edu/applescript/docs/macscrpt_digest_ev.hqx
>>
>>Many thanks, Brian!
>
Where do we get Easy View?
=========================================================================
Date: Mon, 9 May 1994 16:34:43 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: digests in Easy View format
Robert Mark asked.....
>>>Several people have expressed an interest in the digests in Easy View
format.
>>>Brian Hughes has been good enough to provide us with his copy. You'll find
it
>>>in
>>>
>>>ftp://gaea.kgs.ukans.edu/applescript/docs/macscrpt_digest_ev.hqx
>>>
>>>Many thanks, Brian!
>
>
>Where do we get Easy View?
ftp://gaea.kgs.ukans.edu//applescript/addons/easy-view-244.hqx
Or your favorite, congested ftp site.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry Cadence Design Systems pfterry@lks.csi.com +1 913 841 1283
=========================================================================
Date: Mon, 9 May 1994 23:00:01 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kelly A Campbell <camel@CIS.KSU.EDU>
Subject: Re: Referencing an Application by its id type
In-Reply-To: <199405091137.GAA00846@depot.cis.ksu.edu> from "John W. Baxter"
at May 8, 94 10:39:43 pm
>
> >>As long as you are dealing with compiled scripts, don't worry too much
> >>about the name issue. AppleScript in general (and perhaps Script Editor
> >>even more so, perhaps not) works very hard (too hard in some cases) to keep
> >>up with you when you make changes.
> >
> >Actually, this is all done by the Alias Manager. When you choose an
> >application in a tell statement, AppleScript simply saves an alias. That
> >explains all the capabilities and limitations associated with moving
> >scripts to other computers. They behave just like aliases do, except that
> >when AppleScript can't resolve an alias it looks for a running process and
> >if it can't find the right one then it asks the user where the application
> >is.
> >
> >That means that you can avoid being asked by simply making sure the needed
> >programs are already running before you open or run a script.
> >
>
What I was thinking of was something like Peter Lewis' FTPd 2.2.0. It
lets the owner, via a quote site command, list all the processes running
and open and quit applications from a remote computer using their creator
codes. I imagine it does this through the desktop file, but is there a way
to do this kind of thing through AppleScripts?
Thanks,
Kelly
--
,---------------------------------------------------------.
| Kelly A. Campbell | Kansas State University |
| camk@ksu.ksu.edu | Student Publications |
| camel@cis.ksu.edu | Macintosh Tech Support |
`---------------------------------------------------------'
=========================================================================
Date: Mon, 9 May 1994 23:08:09 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: network_manager@ALDUS.COM
Organization: Aldus Corporation, Seattle, WA
Subject: NDN:Re: Referencing an Application by its id type
Your mail to the Microsoft Mail Server could not be fully
delivered! No Valid Addresses! It has been deleted.
Error List:
Bad 'To:' Address: david.rogers@MSM-Inter
=========================================================================
Date: Tue, 10 May 1994 08:39:48 +0100
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Marco Strehler <strehler@FVMED.UNIZH.CH>
Subject: Re: Eudora: strange AppleScript behavior?
>>
>> get MailboxType of first Mailbox of Mail Folder ""
>> -- this works: result 6220 (the IN-Mailbox)
>> get WasteSpace of first Mailbox of Mail Folder ""
>> -- this works: an integer is returned
>> get Name of first Mailbox of Mail Folder ""
>> -- THIS DOESN'T WORK. Error text:
>> -- << Eudora1.4.1 got an error:
>> -- Can't get Name of Mailbox 1 of Mail Folder \"\". >>
>>
>>end tell
>
>As said before, the equivalent Frontier script works. That led me to look
>into Eudora's 'aete' resource ("Dictionary").
>
>And I found that the Name property for a mailbox is 'pNam' rather than
>'pnam' which (a) is the Registry definition, and (b) is what Frontier uses
>(because of how the objectModel table in Frontier is set up). When I
>induced Frontier to ask for the 'pNam' property of a mailbox, the same
>error was returned as AppleScript receives.
>
>So...I changed [in Eudora's 'aete' resource] the code for the Name property
>of a mailbox to 'pnam' and...
> there was no change in behavior.
>
>I went back and changed the Name property of EVERY class in Eudora which
>has one from 'pNam' to 'pnam' and...
> get Name of first Mailbox of Mail Folder ""
>now works fine.
Thanks for help!
Now, here is a script for scanning mailboxes in *nested* mailbox folders.
Marco
copy {} to gMBoxList -- mailbox list
tell application "Eudora1.4.1"
-- start with the root folder
tell me to ScanMailFolder(a reference to (Mail Folder "" of
application "Eudora1.4.1"))
end tell
gMBoxList -- Let's have a look
on ScanMailFolder(Root)
tell application "Eudora1.4.1"
-- call ScanMailFolder recursivly
repeat with i from 1 to (number of Mail Folder of Root)
tell me to ScanMailFolder(a reference to Mail
=46older i of Root)
end repeat
repeat with i from 1 to (number of Mailbox of Root)
-- Add name and number of messages to the list
tell me to =AC
Push((Name of Mailbox i of Root), (number
of Message of Mailbox i of Root))
end repeat
end tell
end ScanMailFolder
on Push(BName, nMessages)
global gMBoxList
set gMBoxList to gMBoxList & {{Box:BName, Messages:nMessages}}
end Push
*
* Marco Strehler, Im Dreispitz 21, 8152 Glattbrugg (Switzerland)
* ++41 (0)1 810 27 03
* strehler@fvmed.unizh.ch
*
=========================================================================
Date: Tue, 10 May 1994 00:35:58 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: Referencing an Application by its id type
> That's essentially what I thought, except that it doesn't quite explain
>(to me) this sequence:
>
>1. Compile a script while program Proj.pi is running under the Think
debugger.
>
>2. With the project not running, try to open/run (I don' recall which...I
>can look up the message traffic if it actually matters) the script. Crash,
>and it became clear (after some playing with MacsBug, that the project file
>had been dealt with as if it were an application.
>
>3. [This is the part that suggests that the signature is kept around
>somewhere]. Open/run the script again, and Think Project Manager is
>launched. The only reason I can see for THAT effect is that they share the
>creator 'KAHL'.
Proj.pi IS run as an application, which is why the alias points to it.
That's how THINK works. It runs your application directly out of your
project file with your program's signature and the type 'PROJ' instead of
'APPL'. I'm not surprised that it crashes, since most of the resources are
in the file Proj.pi.rsrc.
Now, that doesn't explain the strange reason that if you have THINK open
but your project isn't running, AppleScript directs your script to it
instead of your project. I don't know why this happens, but once it does,
you are screwed and have to reboot to send scripts to your project again.
What I think is happening is this. AppleScript tries launching your
project, but notices it's not an APPL. So it grabs the signature of the
file 'KAHL' and launches that, getting THINK Project Manager. Now it
stuffs that in some internal cache and you are hosed for the duration.
How's that?
Jon
=========================================================================
Date: Tue, 10 May 1994 00:36:02 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Making an app scriptable...
--========================_14317516==_
Content-Type: text/plain; charset="us-ascii"
>not a lot happens except the dreaded "applicatiopn Fred does not understand
>wave..." dialog pops up. I tried a few obvious things like swapping the event
>and class IDs in case I had them the wrong way round but that has no effect.
>Anyone got any idea what is going wrong?
No, but here's what I would do to find out.
First off, install the dcmds and templates included in this email (oops,
sorry about the binhex ;) into your Debugger Prefs file. Then reboot. Now
get everything running and break into the debugger. Use the "atsend" macro
which will stop you at every AESend call and display the AppleEvent being
sent. Given that info you can discern a lot. If you want to see what your
handler returns, type "reply" at this point and it will step over the
AESend call and display the reply AppleEvent.
This file contains both the "aevt" dcmd which displays AppleEvents and the
"dd" dcmd which displays AEDescs. It also contains macros which correspond
to the names of all the AE traps (which are selectors off of PACK 8) and
the OSA traps (which are component calls). Both of these are difficult to
trap on without these macros. It also contains the 2 macros I described
above.
I didn't write any of this stuff. It's all on the AppleScript CDs too.
Jon
--========================_14317516==_
Content-Type: application/mac-binhex40; name="AE_Debuggers"
Content-Disposition: attachment; filename="AE_Debuggers"
(This file must be converted with BinHex 4.0)
:$%&&)%4PBR9RCf9bF`"bFh*M8P0&4!!!!!!!!!!!*VN+iJ!!!!!"!!!!*Km!!#8
I!!!!QL"2mS!'mbF`&bj)B'8I'04J2aKR%'!r1*qrB"miC"2e$%&&)%4PBR9RCf9
bFfN#!!)!FR0bBe*6483!!!!!!!!#!(*cFQ058d9%!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!UI5#A`!!!!!!!#Dj#`)""K!("!8)#3!65MJ#N@X@%MJ1!IX#!3!2$!%
(SF8#h#33+!!($rk%$$J1!5pY&Sd6%$J-X3`!"pB-!(&kE36EIa-2rQ!jU*miTdB
N#+X'9DG')$J"#&qdL(jCMaFL95m2!2ik!!!PS+LICA)!%JN"!!!`qJ!#!!$r!dk
kF!!JEJ!!$4!!!J+i6[S%c%(Y!#TK*'%LB5"K(Q%FB4TK''%@B44K%Q%3B3jK$'%
+B3KK"Q%%B3*1F5!I3rVrf*!!LH+))&mr!#m))'d!"%l36PErl%MR$aK#,J!3)#i
!#&+!`,crrrrq+J$DVJ!-+'i!$#`8,L`!"%U'E!4J!!#%)!G3J&+!`,crrrrq*N$
AlJ!-F!L`KfiS)!G3J&+!`,crrrrq)L`!$*+!@)&5JF+mrrrrrLm",`C1ZJPbepp
J1%U(C`K`",#(C`*J0LJ'B#)J#e#!N!#()%!J%()-d)&5J*!!Km#mrrrrrYI!ZSY
X!Q!58i4`!E#%EpLkLfB'(A`!!3!360mBm%jH)&p36dl3M80)480,590548028N3
!!%j@!!")j`-!2#i!#N*(B!K1ZJAf-!G54dM(-JC)`G+")!(PLG+!XSGZjNcZ!-$
rq%jH6R@'5@jNC@jd!!!!6PErr%MR"`JSEJ!)2#i!$LS8)%a3L#e)rra1ZJ9)5-B
["Nkkrjj)EIe)6VS'%R!),`![,[rm6VS'hR!T,`"1ZJ9J6VS&)(i!6qm!&'!F5-B
["Nkkrfj)E[rm5-B["Nkk!M"2l`!-)!G5KlU(EZ"-lK$Jrqa1ANjeLNC[FQeKG%a
TFh3!!!"19[rm51F(##KZ!!Jm,J!1+K3J6),8Mrr%M',`C1Z[mF5'hpF%kk"C!
!F!J[!#mZrra1ZJCFF#N[!%kk"0j1ZJ5HIJ"2l`!8B$4)aLm'6VVql#"Zrr`[%%k
k"a41ZJ6Q)'lrr&L),8Mrr%KZrra)aLm'6VS"PNr[!"!J"e+(ZSGZb%cZ%1$rl%j
H6R@-4QpbE@&d8Q9MEh*N!!!!6PEriNMR$aJU,J!32#i!#NIZrq)Z,J!8)'i!$%R
39Bm[$#m(6VVpV"JIF"b`Kf`%F"aJ!L!(,J!`"P*')!8%J&4&@&4RFJ5!%5NG'@G
U")!'q[i(CbS%J!!&q[0RH!5!![,lZ@Ff")!$![P2CcJ%J!%$$!0RB!5!!4%!mfF
kB&C)EIfH6VS%PNkk!lK)aLm',`a1Z[j+6qm!$'"k5'hpTNkk"(TB6dkk!jT)aLm
',`a1Z[kb8%pJAKE(B!)@h#!(8iG+J'Ef5'lriNkk"&"1ZJ0b@%pJ3%S%Cc)["8k
k"I4)EIfk6VS%0Nkk!eK)aLm',`a1Z[j`6qm!%'!D-"a)`#m!6VS&&%kk!k"B6e@
(5SGXkNkk!bj64NcZ'2$rbNjH6R@+4QpbE@&d4'&dB3!!!%j@!!")j`%B+'i!$#i
84q`!##mX!!3["bm,-#i!#NM!,`"1Z[kX61iBJ2rd6Pj1GBT'Eh*YBA4*G'9Y!!!
!6PB!!%MR!4JQEJ!-+&-Zm(6VS&8%kk!b*`##m!,b`!"%kk"'*1ZJ-56VS$$Lm
--#i!#NM!,`"1Z[q))%a3L#iX!!6HL#D(61iBJ2rd6Pj1GBT'Eh*YBA4%CA0M!!!
!6PB!!%MR!aJQEJ!)+&-X,!!%,L`!##!(FJh3JA6qa)$9NdKYrG*1ZJ-QF!J[!#m
-6VS$p(!T,`"1ZJ*f6VS#0Lm86VS%`%kk!T)["Nkk",C1ZJ+)F!J[!#m(6VS$bNk
k!RT1ZJ*f)%aBL#K),`a`!#m!6VVqlNcZ'-$rm%jH6R@,4QpbE@&d8'&bB@d!!%j
@rrT)j`mB)'i!#$!S!!4R!!'i8d"R(&0!C`4J!!'15'hq!%kkqa4)EIib6VVl$'!
!!CK9MdKZrrT)E[rr6VVl"NSZrrp86fF!!9K`!F#ZrrTQ!!&1)'lrqLeS!!6rqR!
"`+J!"'B!!6SJE[rk,9$rqR!"`*!!CJ!"+LKZrrSX,!!3,L`!$%(X!%BQE!"#emJ
S%bSV!!3-K'&PGR4Q!!$d$)8!!3!"CJ!!kNkk!6T)EIji6VVkKLmX!$*1ZJ1k6VS
"M%kk!BJ[,!!f6VS$UNkk!Aa`##m!,b`!1Nkk!Va1ZJ&X,`41ZJ13!%kk!@*1ZJ&
H6VS"@Nkk!9C1ZJ&5F!J[!#m&6VS#P%kk!0i[2'&NC(*1ZJ0N6VS"0Nkk!6)[,!!
q6VS$9%kk!5C`##m!,b`!3Nkk!QC1ZJ%@5'`!2R!!,`"1Z[f5)%Y3L#e)rrT2l`!
dB!T)E[rk6VVq'PK2)!G6KdU!CZiJE[rk@+lrqLm36VS$"Nkk!(*B6f!+5'lrqNk
krI*B6b!'8iC+J'EZ6VS!@'!i5'hqRNkk!5K1ZJ"+@%pJ+%KYrVK1Z[Q5B"j)EIl
U6VS"$L"Z!!J`+!!%5-![!%kk!TC1ZJ!J8%p-lKM`rq*1ALkI6R@-3dp068&14%9
19&*C!!!!6PB!!#m,4qhr!#m,)!Y5J#m!,bhqr%kk!dB@VIlr,`Y1Z[NbF!!V32l
m*Qlrr%jH6R@(8(9d6'PZC3!!6PB!!#m,4qhr!#!Yr[a5VIlm&ki!#`!!*Qlrr%j
H6R@(8(9d3fKKFJ!!6PB!!(!J,`"1Z[r-6Pj1GBK3GA46F'&MC3!!!%j@!!")j`-
B+'i!#%IYr`!X,J!-,Li!%#m-)#hqr0#,,`!["Nkk!VEGVIlmB!41Z[qd[Uhqr'l
f-#hqrN)c!!"-lKM!rr"1ANjeLP"eG%*jG'9c9'm!!!"19J!!51F"%#CZ!!K`!"!
6,J"`!#m!,`FL#e+",`&1Z[q)61i)J2ri6Pj1GBG3GA438h4b!!"19J!!51F2!#`
Z!"!Z,J!-)#i!#!+!!!!!$bS!)#i!#1L)+!"R'#!'8i![!#!(8i![!#m%6VVrbNr
[!!aJ+&1'5SG[$#!(8i#FJ'!%6VVr#,bYr[aZpQ!+F$![!%kkrXjBMe1(E[*`#V#
&Ba!J"A)`d)%[!%kkrVCBMf!1)!9bUC!!J5m!6VVqTPL261i!m2r`6Pj1GBT3GA4
95'9i@P4[!!!!6PB!!(!!,`![,J!-,bi!#%kkrda1ANjeL&"eG&9)CAKD!!!!6PB
!!(!!,`"b"#m"G!!d,J!+,`*1Z[mN6Pj1GBY3GA495'9i9fpbC!!!6PB!!%MR$`!
U,J!),Li!$#!&FJT1ZJ$i+!!J"A)+6VS!hL`!Ca!J"e1!,`!["Nkkrp"3Mf!B9BG
J"%kkrLUqVIlmE[C`)bm!6VVpmPL2)!4b-0#",`"1Z[hN@)p-lJ$`rr"1ANjeL9"
eG&9%C@08E`!!6PB!!(!!,`![,J!)6VVrJ%jH6R@(8(9d984PB`!!6PB!!#m(,Li
!#(!B)JIJU5!m!!!!rm#",`"1Z[f3!(!3)JIJU5!m!!!!rm#",`"1Z[em)!IJL#)
m!!!!rm+!,`&1Z[eU)$`!!!$r`)F[!%kkr9`Z,[rm6Pj1GBP3GA428e4jF'8!!#)
[!!3J,`!)6VS!$L!"6R8L,`!%)#m!#%MR1!!N!8K#5N*Q($B!3N")3'F%J-%d!%K
#-!1!`63!)J*#3%K!B#)N!%*!5%")3N*#*J&b!(J2e),4J0+"X)0P"*!!Je)"8Fc
rm%cI!"a1G5)I)"mLAb"IS#iL38l4,`![!6![!"$"l`!1-Lm!$-2[!",338K!3N!
b,`!5`Zm!$Y#",d!!%#)I)"m[9`!%@)p1G598@9"&)%a&6NG85#!J)#"%394")#!
SE'PcG#"cG'&bG(-JBA3J!!!X5d9C)#"8@9"&)%a&6NG85#!J)#"%394")#!SFQ9
MEh*N)(0dBA*dFb"KG#!!"QaTFh3k)!!5Ef*UC@0d)(0`C@0TCQPPFMSJ!"BJE'p
[Dh-JE'PVC5"K)(*PBfpbC$SJ!#Y339*0)&4C8%8J6%914e4))#!J)%4"9%%J)#K
`BA*KE5"cG'&bG(-JBA3J!!![B@9fG#"KC'4bCA0cAfpQAd&`F'aP4ACPER4IC'9
cBh*TF(4[FL!S1#mb-Lmj-5N!!%-J)#"3FQPZG(-JEh9d)'0[ER4PER4c)'pQ)'&
Z)%&`F'aP)'9fC@jd)(GTG'JJF'&bB@ePG'9bFb"QEh*YBA4dC@3Z!!!N3da"8e-
J583J)#"59&*1583J)#"38Np86d026#"@49*658p1!"G#B@3JF(*[G'pMEf`JEh)
JGQ9bFfP[EJ!!,d9bFQpb1L"TE'aPCf&X)'9iF(*PFh0TEfiJEh)JBQ&N)'&NC(*
PFh-JG'mJEA0R!!!3G@jVEQphEL"bCA&eCA0d)!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!"lB!!J)!6[S!3N(Y!#TK*'%LB5"K(Q%FB4TK''%@B44K%Q%3B3jK$'%+B3K
K"Q%%B3*1F5!I3rVrf*!!LH+))&mr!#m))'d!"%l36PErmNMR"aJJEJ!)-#J!"'F
!!G463'FF8d"R"'!!!DT)EIi#6VVrRNKYrLK1Z[q@B!!"Y&@25'lrqNKZrrp1Z[q
3!%SZrrp8MfF!!A4`!F#ZrrTQ!!&U5'hq3Nkk!S!JE[rk,a"1ZJ3X6VS"Q#"ZrrS
YD!!%rr)YE[rbrrC3MfF!!5j`!F#Zrr*Q!!%D)'lrmLe3rr*`!F#3!'B!!3SJ,[r
b8B!J3#`3+JC)48M&i%8#KJ$rrrp`$m!&FJ!5!&""5-%Z"Tk"5'hq9Nkk!K*`##m
!,blrpNkk!Yj)EIjS6VS"rR!),`!["dkk!Xa)EIji6VS"l%L&-$`!`-!&6qm!('F
S"!!!3'F+"!!!3'F3B!!!PR"-,`"1ZJ%S@)pJ'("5,`"1ZJ%F@)pJ$("',`"1ZJ%
3@)pJF%kk!-a`##m!,blrmNkk!R*1ZJ%L6VS"(LKZrr)Q6(!3em"3Mf!5-"4)`#m
!6VS#GNkk!3*BMe5-YmaLkNkk!2C1ZJ$bF'3[!()3,`%[,[rb6VS!rJDZ!!!!%2r
b6VS!F%r[!!`%K`!!!""+Kfk@B%*)EIk-6VVq'Q!i5'hqUNkk!5K1ZJ"+@)pJ+%K
YrVK1Z[i!B"j)EIlU6VS"$L"Z!!J`+!!%5-![!%kk!TC1ZJ!J8)p-lKMJrpj1ALk
I6R@-3dp068&14%919&*C!!!!6PB!!#m,4qhr!#m,)!Y5J#m!,bhqr%kk!dB@VIl
r,`Y1Z[fJF!!V32lm*Qlrr%jH6R@(8(9d6'PZC3!!6PB!!#m,4qhr!#!Yr[a5VIl
m&ki!#`!!*Qlrr%jH6R@(8(9d3fKKFJ!!6PB!!(!J,`"1Z[r-6Pj1GBK3GA46F'&
MC3!!!%j@!!")j`-B+'i!#%IYr`!X,J!-,Li!%#m-)#hqr0#,,`!["Nkk!VEGVIl
mB!41Z[qd[Uhqr'lf-#hqrN)c!!"-lKM!rr"1ANjeLP"eG%*jG'9c9'm!!!"19J!
!51F"%#CZ!!K`!"!6,J"`!#m!,`FL#e+",`&1Z[q)61i)J2ri6Pj1GBG3GA438h4
b!!"19J!!51F2!#`Z!"!Z,J!-)#i!#!+!!!!!$bS!)#i!#1L)+!"R'#!'8i![!#!
(8i![!#m%6VVrbNr[!!aJ+&1'5SG[$#!(8i#FJ'!%6VVr#,bYr[aZpQ!+F$![!%k
krXjBMe1(E[*`#V#&Ba!J"A)`d)%[!%kkrVCBMf!1)!9bUC!!J5m!6VVqTPL261i
!m2r`6Pj1GBT3GA495'9i@P4[!!!!6PB!!(!!,`![,J!-,bi!#%kkrda1ANjeL&"
eG&9)CAKD!!!!6PB!!(!!,`"b"#m"G!!d,J!+,`*1Z[mN6Pj1GBY3GA495'9i9fp
bC!!!6PB!!%MR$`!U,J!),Li!$#!&FJT1ZJ$i+!!J"A)+6VS!hL`!Ca!J"e1!,`!
["Nkkrp"3Mf!B9BGJ"%kkrLUqVIlmE[C`)bm!6VVpmPL2)!4b-0#",`"1Z[hN@)p
-lJ$`rr"1ANjeL9"eG&9%C@08E`!!6PB!!(!!,`![,J!)6VVrJ%jH6R@(8(9d984
PB`!!6PB!!#m(,Li!#(!B)JIJU5!m!!!!rm#",`"1Z[f3!(!3)JIJU5!m!!!!rm#
",`"1Z[em)!IJL#)m!!!!rm+!,`&1Z[eU)$`!!!$r`)F[!%kkr9`Z,[rm6Pj1GBP
3GA428e4jF'8!!#)[!!3J,`!)6VS!$L!"6R8L,`!%)#m!#%MR1!!N!8K#5N*Q($B
!3N")3'F%J-%d!%K#-!1!`63!)J*#3%K!B#)N!%*!5%")3N*#*J&b!(J2e),4J0+
"X)0P"*!!Je)"8Fcrm%cI!"a1G5)I)"mLAb"IS#iL38l4!!`NEA0R)'&NC(*PFh0
IEfCI3A"`E'9&GQ9ZG&pNCA0MFQP`G'pb!"JJ)#"3FQPZG(-JEh9d)'&Z)%&&4'9
cBbi!%84PFf0bDA"dEh)JG(P`C6SJ!!!2E@&cG'9b)("dFL"KG$SJ!!!1)#"LE'p
MDb"cDATP1L!!%6XJ)'*XEf0V)(0dBA4eFcSJ!!!F4A*bEh)k)'*KC#"NBA4K5'&
ZC'aP)'CTC@aN,J!,6P9-6#"SB@jNE'8!!#p&FR*[FMSJD@aXC@GKE#"PH("bCA0
cD@pZ)'pb)'*KC#"KC'4bCA0c)(4[)'ecC`!!%(9ZDfj[GfiJFQ9aG@9cG#!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!Lq!$m-389$FQ9KG'9%CA0M%U"3B@0V1#"54$!
ZGb!p)$Jb03Y"480[CA*MC9"dFK+J8'&MDcJJ8N3`,RFJ25"K-$)-389$Ef9bBf9
%CA0M%U"3B@0V1#"54$!ZGb!p)$B`-`e"484TFh"[Ff9%CA0M%U"3B@0V1#"54$!
ZGb!p)$)`0!p"484eF'aTBf&dC84PFf-5S&"KBfXi)&*%-#jh)$dJ0$!e$%&&3h*
PBA4P6'PcG"+J8'&MDcJJ8N3`,RFJ25!h-$B-389$Eh9ZG%PdC@ec%U"3B@0V1#"
54$!ZGb!p)$3`0`K"49"eG&"dFK+J8'&MDcJJ8N3`,RFJ25""-$J*3893GA4%CA0
M%U"3B@0V1#"54$!ZGb!p)$B`13Y"48GPG%jdD&"dFK1J8'&MDcJJ8N3`,RFJ25!
a-$""$%&&4f9d6R4S4'9cBa+J8'&MDcJJ8N3`,RFJ25""-%)23896DATP6fC1G'K
*G'9Y%U"3B@0V1#"54$!ZGb!p)$Jb33T"48GPG%&bFQ&j%U"3B@0V1#"54$!ZGb!
p)%3`3`T"49"eG%&bFQ&j%U"3B@0V1#"54$!ZGb!p)%)`4!a"484PE'9dC8PdC@d
5S&"KBfXi)&*%-#jh)$dJ0$"d&&8(9d5f9j8(4b%U"3B@0V1#"54$!ZGb!p)%%
`4Ja"49"eG%YPH84PFf-5S&"KBfXi)&*%-#jh)$dJ0M%`#d&&4f9d5f9j8(4b%U"
3B@0V1#"54$!ZGb!p)'8a-3a"48GPG%YPH84PFf-5S&"KBfXi)&*%-#jh)$dJ1$%
b$d&&8fPkC8pQ5f9j4'9cBa+J8'&MDcJJ8N3`,RFJ25!i-MN2389%C@aPG'9,CAP
%CA0M%U"3B@0V1#"54$!ZGb!p)$3a-`e"49"eG&"KFQ&Y8(4b%U"3B@0V1#"54$!
ZGb!p)'%`CJj"49"eG&"KFQ&Y4'9cBa+J8'&MDcJJ8N3`,RFJ25!f-6!0389(CA4
3BA*KE9"dFK+J8'&MDcJJ8N3`,RFJ25"P-6%1389(CA43BA*KE84PFf-5S&"KBfX
i)&*%-#jh)$dJ1$%b$8&&8fPkC8pQ8'&bB@d5S&"KBfXi)&*%-#jh)$dJ1$)j$8&
&4'9XCA4P8'&bB@d5S&"KBfXi)&*%-#jh)$dJ0$%c%8&&4f9d3A4dFQPLGA4P8(4
b%U"3B@0V1#"54$!ZGb!p)'8a04*"48GPG%&dG(*TBR9dC84PFf-5S&"KBfXi)&*
%-#jh)$dJ1$)f%8&&8fPkC8pQ3A4dFQPLGA4P%U"3B@0V1#"54$!ZGb!p)$Jb1"&
"49"eG%&dG(*TBR9dC9"dFK+J8'&MDcJJ8N3`,RFJ25"K-6B53893GA4"G(4bD@*
eG'9%CA0M%U"3B@0V1#"54$!ZGb!p)$Bb0a*"480bC@&dC8&`F'aP4ACPER35S&"
KBfXi)&*%-#jh)$dJBM%d"N&&8f9ZC"+J8'&MDcJJ8N3`,RFJ25"N-6F63893FQp
MCA0c3A"`E'9&GQ9ZG"+J8'&MDcJJ8N3`,RFJ25!b-@)-3895CA0PG&4TE@9b%U"
3B@0V1#"54$!ZGb!p)$)a14K"490eFh"PEQ48D'9$GA*bC@jd4ACPER35S&"KBfX
i)&*%-#jh)$dJ-M*L&d&&8Q9cG@eP9'KP3h9bFQ9ZG%9fC@jd%U"3B@0V1#"54$!
ZGb!p)$Ja1"4"48GPG&4SC80eFR*PER4&GQ9ZG"+J8'&MDcJJ8N3`,RFJ25!b-@%
83896CA48D'9$GA*bC@jd4ACPER35S&"KBfXi)&*%-#jh)$dJ-M*$&d&&4f9d5@j
dCA*KBh4TEfj"E'a[Gf9N%U"3B@0V1#"54$!ZGb!p)$)aC"G"490PG%PZG'9bB@0
dD@pZ3@aXEhGPC"+J8'&MDcJJ8N3`,RFJ25!a-@85389*ER4PFQ&MG>G'K9Ff9
b%U"3B@0V1#"54$!ZGb!p)$BaBa9"48PZFh4KE'a&GQ9ZG%KKEQ4XCA)5S&"KBfX
i)&*%-#jh)$dJ16&Q&%&&8Q9YEhCP4ACPER4)B@jNE'9b%U"3B@0V1#"54$!ZGb!
p)$Fb-"&"48GPG%9fC@jd5'&ZC'aPFK+J8'&MDcJJ8N3`,RFJ25!j-M%B389*ER0
dB@aX3fpPFQ0TEfj)B@jNE'9b%U"3B@0V1#"54$!ZGb!p)'%b-KG"49*PE@pfC80
[CA*MD@pZ5'&ZC'aPFK+J8'&MDcJJ8N3`,RFJ25!h-M-8389(CA4$Ef9bBfP[ENK
KEQ4XCA)5S&"KBfXi)&*%-#jh)$dJBM)d&d&&5@jcG'&XE&0`C@0TB@a)B@jNE'9
b%U"3B@0V1#"54$!ZGb!p)$8`-"C"49*PE@pfC90`C@0TB@a)B@jNE'9b%U"3B@0
V1#"54$!ZGb!p)$8`-40"48GPG&0`C@0TB@a)B@jNE'9b%U"3B@0V1#"54$!ZGb!
p)$8bC"4"Bf0PF(4)D@GS6'9fC@a&GQ9ZG"#JB6JiCL"cF&iZGb!p)$-d&%&&8f9
d6f*UC@0d3f&XE%*KBfYc%U"3B@0V1#"54$!ZGb!p)%8c03P"49*PFfpXGQ85S&"
KBfXi)&*%-#jh)$dJ06-f&d&&5@jcG'&XE%pLDQ9MG%&MBf9cFfpb%U"3B@0V1#"
54$!ZGb!p)$Nc0aC"49*PE@pfC8pLDQ9MG%&MBf9cFfpb%U"3B@0V1#"54$!ZGb!
p)$Fc1"0"48GPG%pLDQ9MG%&MBf9cFfpb%U"3B@0V1#"54$!ZGb!p)$Nc13j"484
TFh"[Ff98EfYPEK+J8'&MDcJJ8N3`,RFJ25!b-d%8389$B@aX6f*UC@0d3@0MCA0
cEh)5S&"KBfXi)&*%-#jh)$dJ3c0##%&&9P46C@jN$Q&PGR3J3#K5B6FV-6BT"Q&
dFf9ZC"GKG')JB@9cC@jN)#Fl)'&PGR4cC@jN*`9bCA"XH4"d1f&PGR3J3#K5B6F
V-6)T!!!(33!["dp638a[B@39C'&dBA"eBR0YCh)J3(0`28-`-$!a#%p6390dEh*
P&Q4KG'&`G@*cE@Gb)%"cF$da-$!`-$)+6e0"4AKPBh9dC4CNBA4KF(9LFfeRFL"
!Fh!p-6!`-$!c#Np6384TFh"XBAN@C'&dBA"eBR0YCh)J3(0`26%`-$!`0!j28d&
6Bh*TF(4&FR*[FK9NBA4KF(9LFfeRFL"!Fh!p3c!`-$8+6e0"4'PcF'pcC49NBA4
KF(9LFfeRFL"!Fh!p0$!`-$B36e0"8f9d8f0bDA"d5@jQEa9NBA4KF(9LFfeRFL"
!Fh!p3c!`-$F36e0"4f9d8f0bDA"d5@jQEa9NBA4KF(9LFfeRFL"!Fh!p3c!`-$J
36e0"8f9d3@0dDACP8(*[Ba9NBA4KF(9LFfeRFL"!Fh!p1$!`-$J36e0"4f9d3@0
dDACP8(*[Ba9NBA4KF(9LFfeRFL"!Fh!p1$!`-%%C6e0"8f0bDA"dD@jR3fpYF'p
ZC@jd6Q&YC49NBA4KF(9LFfeRFL"!Fh!p0$!a-$)+6e0"3fpYF'PXC49NBA4KF(9
LFfeRFL"!Fh!p3c!a-$-*6e0"3fp`H8P%&@4KG'&`G@*cE@Gb)%"cF$di-$%`0!a
28d&(CA46Eh9bBf89C'&dBA"eBR0YCh)J3(0`28-`-M!a%8p6380[CA*MC8CbEfe
%CA0M&@4KG'&`G@*cE@Gb)%"cF$e$-$-`-3p28d&$Ef9bBf98Ed4PFf-@C'&dBA"
eBR0YCh)J3(0`26%`-$-`-Jj28d&6CA46C@jN8(*[Ba9NBA4KF(9LFfeRFL"!Fh!
p1$!d-$%16e0"4f9d8f9ZC&"bEf-9C'&dBA"eBR0YCh)J3(0`26J`0$!b%%p6390
PG%0bC@&dC9"bEf-9C'&dBA"eBR0YCh)J3(0`26J`0$!c%%p638GPG%0bC@&dC9"
bEf-9C'&dBA"eBR0YCh)J3(0`26J`0$!d%dp6390PG%4PCQ&eE(48BA*RCA39C'&
dBA"eBR0YCh)J3(0`263`0$!e%8p6390dBA*d8Q9MEh*ND@jR&@4KG'&`G@*cE@G
b)%"cF$dd-$8`-4"28d&6G'p`8Q9MEh*ND@jR&@4KG'&`G@*cE@Gb)%"cF$dd-$8
`-Jj28d&-Ef&N4AKPBh9dC4CNBA4KF(9LFfeRFL"!Fh!p-6!`0M!a%8p6380[EA"
TE'9&H'9MGA4P&Q4KG'&`G@*cE@Gb)%"cF$da-$!f-$),6e0"4'p6Bh*TF(3@C'&
dBA"eBR0YCh)J3(0`26%d-$B`-aK28d&6CA45CA0eE@9%DA0`BA4MD&"bEf-9C'&
dBA"eBR0YCh)J3(0`26J`1$!a'%p638GPG&*PFh9YC84TFh"KG'0S8(*[Ba9NBA4
KF(9LFfeRFL"!Fh!p1$!i-$)26e0"4AKPBh9dC89fC@jd&Q4KG'&`G@*cE@Gb)%"
cF$da-$!i-$-+6e0"4'p&GQ9ZG"CNBA4KF(9LFfeRFL"!Fh!p-6!`1$!d$Np638e
KDf9$EfjdCAKd&@4KG'&`G@*cE@Gb)%"cF$e$-$J`04428d&6CA4$GA*bC@jd4'P
KE'9MG"9NBA4KF(9LFfeRFL"!Fh!p-M!h-$%86e0"4f9d3h9bFQ9ZG%4TB@aPBh3
9C'&dBA"eBR0YCh)J3(0`263`0c!b&%p638&fB@PXB@*XC84TB@aPBh4c&@4KG'&
`G@*cE@Gb)%"cF$dd-$F`-a&28d&(CA4%D@&XC@0d5@jQEa9NBA4KF(9LFfeRFL"
!Fh!p36!h-$3E6e0"3ACKD@aKBQaP4'PKE'9MG%0[C'9-DA0d&@4KG'&`G@*cE@G
b)%"cF$dd-$F`04P(CA4%C@CKG@ad8f0bDA"dD@jR8hPcG'9Y&@4KG'&`G@*cE@G
b)%"cF$dd-6!`-4P6CA4%C@CKG@ad8f0bDA"dD@jR8hPcG'9Y&@4KG'&`G@*cE@G
b)%"cF$dd-6!`-K9(CA46Bh*TF(4TEQG$Efe`EfjPER39C'&dBA"eBR0YCh)J3(0
`26Ja-$!c(%GPG&0MFQP`G'PZCe0jFh4PE8CbEfe6G'pbC@39C'&dBA"eBR0YCh)
J3(0`26Ja-$!d$dGPEQ9bD@08Ee*PB@a*4"9NBA4KF(9LFfeRFL"!Fh!p1$%`-$8
28Q9KE&4[4f9ZCA*TBdP%&@4KG'&`G@*cE@Gb)%"cF$di-6!`0K*0B@YP4f9ZCA*
TBd0[ER4PH(39C'&dBA"eBR0YCh)J3(0`28-a-$!h"N&65@jTG"CNBA4KF(9LFfe
RFL"!Fh!p-@-a-$!a%8&68f9d8fpeFQ0P8h4jE'9c&@4KG'&`G@*cE@Gb)%"cF$d
d-6!`-K&"8dGPG&0[GA*MC90dH@aPFa9NBA4KF(9LFfeRFL"!Fh!p0$%`-$-9390
(CA46Eh9bBf96G(PXC8jKE@9c&@4KG'&`G@*cE@Gb)%"cF$dd-6!`0!!!!%B36R9
YBQ9b)'pQ)'eKBh*[Fdp$6P3&+LSU+LT-8e4$#NeKBh*[)'jKE@938e45#89iF'&
ZFfP[EP"69&)&+LSU+LT-8e4&!!!"!!!!*Km!!#8I!!!!QJ$,!M3G"!!!!"`!FJ!
#C'0YC!!"!"TYH'*Y!!%!-P408%`!!!"+!q`!!!!!!!!!b[m%!)J!"3!!$43!b[m
)!'S!#!!!&-i!b[j)!qJ!'!!!(C!!!-ViZ!2S!#-!!#69!-X!!!4KCACd!Q4N$d&
`F'aP4ACPER3JF'&MD`T28d%J6@&MFQpc"'eiBQeF+3:
--========================_14317516==_--
=========================================================================
Date: Tue, 10 May 1994 00:50:59 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Referencing an Application by its id type
At 00:35 5/10/94 -0700, Jon Pugh wrote:
>Proj.pi IS run as an application, which is why the alias points to it.
>That's how THINK works. It runs your application directly out of your
>project file with your program's signature and the type 'PROJ' instead of
>'APPL'. I'm not surprised that it crashes, since most of the resources are
>in the file Proj.pi.rsrc.
>
>Now, that doesn't explain the strange reason that if you have THINK open
>but your project isn't running, AppleScript directs your script to it
>instead of your project. I don't know why this happens, but once it does,
>you are screwed and have to reboot to send scripts to your project again.
>
>What I think is happening is this. AppleScript tries launching your
>project, but notices it's not an APPL. So it grabs the signature of the
>file 'KAHL' and launches that, getting THINK Project Manager. Now it
>stuffs that in some internal cache and you are hosed for the duration.
>
>How's that?
It works for me. Thanks a lot, Jon. [What I hadn't noticed was that
restarting caused AppleScript to stop running TPM instead of the project.]
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Tue, 10 May 1994 04:44:22 CDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Dave Hillman <d-hillman@UCHICAGO.EDU>
Subject: Help: Save and Parse from Log
Hello there,
I'd appreciate it if an AppleScript expert could help me with this. I'm
just learning it myself. The script follows, and my problem follows it.
set crlf to (ASCII character 13) & (ASCII character 10)
set http_10_header to "HTTP/1.0 200 OK" & crlf & "Server: MacHTTP" & crlf & =
=AC
"MIME-Version: 1.0" & crlf & "Content-type: text/html" & crlf & crlf
launch application "Scriptable Text Editor"
-- Takes http_search_args and appends them, with date, to a specified file
tell application "Scriptable Text Editor"
open alias pathname:filename
set contents to contents & crlf & (current date) & http_search_args
close alias pathname:filename
end tell
-- Returns specified dummy HTML upon completion of data submission
return http_10_header & "<a href=3D%20/thanks.html%20><h2>Thank You</h2></a>=
"
What I would like this to do, is take the http_search_args from MacHTTP
[World Wide Web server for Mac] and append them to a specified file. Right
now, I'm only interested in saving Comments from a feedback form, but I
want to do more.
http_search_args is a variable predefined by MacHTTP. Can anyone help me
with why this launches the Text Editor, but is profoundly uninterested in
doing anything with it?
any help greatly appreciated,
dave
ps it lives at "http://crossroads.rh.uchicago.edu/Logs/Annotate.html"
________________________________________________________________________
Dave Hillman "Some people love the sound of their own voice...
d-hillman@uchicago.edu I love the sound of
my own footsteps."
=========================================================================
Date: Tue, 10 May 1994 10:01:28 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Sean M. Joyce" <sjoyce@HEIDELBERG.EDU>
Subject: Scripts for searching files
Hello. Please forgive this novice on the list or point me with a flame to
the nearest AppleScript FAQ.
I'm looking for information on how to write an AppleScript which will
search a text file for a character string, and then return the line(s)
containing that string to the user (a la "grep"). I would like to get such
a script to work in conjunction with MacHTTP to provide for searchable
files, like phonebooks. I've looked at the sample script provided with
MacHTTP, which teaches me how to accept a character string for which to
search, but cannot figure out how to then look for this string in a text
file.
TIA for any help.
-----
Sean Joyce
sjoyce@heidelberg.edu
=========================================================================
Date: Tue, 10 May 1994 07:18:42 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Help: Save and Parse from Log
>set crlf to (ASCII character 13) & (ASCII character 10)
>set http_10_header to "HTTP/1.0 200 OK" & crlf & "Server: MacHTTP" & crlf &=
=AC
> "MIME-Version: 1.0" & crlf & "Content-type: text/html" & crlf & crl=
f
>
>launch application "Scriptable Text Editor"
>
>-- Takes http_search_args and appends them, with date, to a specified file
>
>tell application "Scriptable Text Editor"
> open alias pathname:filename
> set contents to contents & crlf & (current date) & http_search_args
> close alias pathname:filename
>end tell
>
>-- Returns specified dummy HTML upon completion of data submission
>
>return http_10_header & "<a href=3D%20/thanks.html%20><h2>Thank You</h2></a=
>"
>
>
>What I would like this to do, is take the http_search_args from MacHTTP
>[World Wide Web server for Mac] and append them to a specified file. Right
>now, I'm only interested in saving Comments from a feedback form, but I
>want to do more.
You are telling the application to set ITS contents. Try telling the
document to set its contents, instead.
tell application "Scriptable Text Editor"
open alias pathname:filename
tell document 1
set contents to contents & crlf & (current date) & http_search_args
end tell
close alias pathname:filename
end tell
------
Or...(probably faster). Take advantage of the fact that when Scriptable
Text Editor opens a document, it puts an insertion point at the end of the
document. selection is a property of the application:
tell application "Scriptable Text Editor"
open alias pathname:filename
set selection to crlf & (current date) & http_search_args
close alias pathname:filename
end tell
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Tue, 10 May 1994 10:40:40 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Luis Muench <muench@SOLIX.FIU.EDU>
Subject: AS in the MacHTTP package
Just downloaded the HTTP package for the AS. I am currently upgrading
from version zip of AS ( never had it). There is something missing from
the package, aint there!! Where is the editing environment? All that was
in the package was the AS extension, the Frontmost ext and some stuff in
the scripting additions folder. How is one supposed to edit/compile the
scripts? Pardon my ignorance :^)
---___--__ _/ _// _// | "My Karma Ran Over My Dogma"
___-- _/ _/_/ _/_/ | muench@solix.fiu.edu
_/ _/ _/_/ _/ | muench@servax.fiu.edu
-_-_--- _/ _/ _/ _/ | Luis Muench - graphic artist
_/_/_/ _/ _/ | FloridaInternationalUniversity
=========================================================================
Date: Tue, 10 May 1994 10:57:03 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: King Rhoton <king@ACPUB.DUKE.EDU>
Subject: Re: AS in the MacHTTP package
>Just downloaded the HTTP package for the AS. I am currently upgrading
>from version zip of AS ( never had it). There is something missing from
>the package, aint there!! Where is the editing environment? All that was
>in the package was the AS extension, the Frontmost ext and some stuff in
>the scripting additions folder. How is one supposed to edit/compile the
>scripts? Pardon my ignorance :^)
To edit it, you have to buy it. Only enough for runtime is freely
redistributable.
King Rhoton king@acpub.duke.edu
=========================================================================
Date: Tue, 10 May 1994 10:12:30 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: AS in the MacHTTP package
In-Reply-To: Your message of "Tue, 10 May 94 10:40:40 EDT"
>Just downloaded the HTTP package for the AS. I am currently upgrading
>from version zip of AS ( never had it). There is something missing from
>the package, aint there!! Where is the editing environment? All that was
>in the package was the AS extension, the Frontmost ext and some stuff in
>the scripting additions folder. How is one supposed to edit/compile the
>scripts? Pardon my ignorance :^)
You have to buy the AppleScript Scripting Kit or Developer's Kit or System 7.5
when it's available. You can also get it by buying either Danny Goodman's
Complete AppleScript Handbook or Schneider's Tao of AppleScript. :-(
Ain't no free lunch.
Or get tickle (ftp://ftp.msen.com/pub/vendor/ice/tickle). It's free or
shareware, and you can edit and compile the scripts with it. Even includes OSA
versions of tcl and jpl. This is closer to free.
pf
=========================================================================
Date: Tue, 10 May 1994 07:44:07 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Russell Gum <rgum@AG.ARIZONA.EDU>
Subject: Excel script problems
Help please. I am a frustrated rookie scripter.
How do you select a spreadsheet in excel from several that are open to be
the active sheet. The following script opens two sheets but I cant seem to
navigate back and forth between them without closing one each time I want
to switch. Surely there must be a better way. I want to use bound sheets
in a workbook but I thought I had better start with the simple case first.
I am trying to write a script that will delete rows in one worksheet as a
result of information in the other.
tell application "Microsoft Excel"
if not (exists Document "ExcelHack") then
open alias "B:as:ExcelHack"
end if
if not (exists Document "tn") then
open alias "B:as:tn"
end if
activate Window "ExcelHack" This does not work tn is still active
(on top)
set selection to Range "R2C2:R101C2"
set foo to selection
set poo to value of foo
item 100 of poo
end tell
Also poo is a list of lists.ie {{"1"},{"2"}} is there a simple way to get
the values into a simple list?
Thanks
=========================================================================
Date: Tue, 10 May 1994 08:47:46 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Benjamin Broder <bbroder@HSC.USC.EDU>
Subject: Re: AS Kit differences
I've finally (duh) figured out the difference between the
AppleScript Software Development Toolkit (R0175Z/B through
APDA 800-282-2732 $199) and the AppleScript Scripter's Kit
(M1730LL/A retail $189, available for less through most
mail order houses).
The product available from APDA includes the CDROM with
much additional information, the other product does not.
Both kits include 4 800K disks (3 AppleScript + 1 FrontMost)
and three manuals: Getting Started with AppleScript,
The AppleScript Language Guide (English Dialect), and the
AppleScript Guide to Scriptable Applications.
Both include a redistribution license.
Ben
--
bbroder@hsc.usc.edu Benjamin Broder FAX (818) 457-4100
USC Institute for Health Promotion and Disease Prevention Research
1000 S. Fremont Ave. #641, Alhambra, CA 91803-1358 (818) 457-4029
=========================================================================
Date: Tue, 10 May 1994 13:19:54 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: AppleScript 1.1 vs. Easy Open 1.0.3
I'm been having one of the strangest conflicts since I received my
8100 upgrade last month. For some reason there appears to be a conflict
between Easy Open 1.0.3 and the Script Editor 1.1. Any scripts that I
try to work with are formatted in a very screwed up manner. Things like
one word per line, sometimes only a " on a line. It makes it impossible
to work with unless I don't load the Easy Open extension. Has anyone
seen or heard of this before? Anyone know of a fix, or a newer version
of MEO? Thanks for the assistance.
-Hades
=========================================================================
Date: Tue, 10 May 1994 12:28:37 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: AppleScript 1.1 vs. Easy Open 1.0.3
In-Reply-To: Your message of "Tue, 10 May 94 13:19:54 EDT"
> I'm been having one of the strangest conflicts since I received my
>8100 upgrade last month. For some reason there appears to be a conflict
>between Easy Open 1.0.3 and the Script Editor 1.1. Any scripts that I
>try to work with are formatted in a very screwed up manner. Things like
>one word per line, sometimes only a " on a line. It makes it impossible
>to work with unless I don't load the Easy Open extension. Has anyone
>seen or heard of this before? Anyone know of a fix, or a newer version
>of MEO? Thanks for the assistance.
Now that you mention it, I have seen this before on my IIci. At the time, I
attributed the problem to another program. I'll try this out tonight.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Tue, 10 May 1994 10:30:45 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Lance Ware {VOXEL Guru} <lware@VOXEL.COM>
Subject: Getting a list of Open Application in Frontier
Is there an easy way to do it?
Lance
___________________
Lance Ware
IS Manager
VOXEL
Laguna Hills, CA
=========================================================================
Date: Tue, 10 May 1994 12:46:58 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: new files on gaea
Over the last few days, I've been dropping the latest versions of some
programs on gaea. These include a new versions of Jon's Commands, Script
Tools, OSA Menu (yah!), and Acid Jazz. You'll also find a demo version of an
interesting utility called Torquemada's Ghost.
Enjoy.
pf
ftp://gaea.kgs.ukans.edu/applescript/osaxen/jons-commands-111-as.hqx
ftp://gaea.kgs.ukans.edu/applescript/osaxen/ScriptTools1.3.sit.hqx
ftp://gaea.kgs.ukans.edu/applescript/addons/OSA_Menu_1.0.1.sit.hqx
ftp://gaea.kgs.ukans.edu/applescript/addons/Acid_Jazz_1.2v2.sit.hqx
ftp://gaea.kgs.ukans.edu/applescript/scriptableapps/TorquemadasGhost.sea.hqx
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry Cadence Design Systems pfterry@lks.csi.com +1 913 841 1283
=========================================================================
Date: Tue, 10 May 1994 11:41:23 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Neil Rest <neilrest@ECOTONE.TOAD.COM>
Subject: Re: AppleScript FAQ
I have indexed several of the major ftp sites, and > gaea.kgs.ukans.edu < is
alone
in having an "applescript" directory. In addition to a 32K faq, there are
subdirectories of addons, docs, osaxen, scriptableapps and scripts.
Neil
=========================================================================
Date: Tue, 10 May 1994 15:52:23 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Herb Schilling <hschilling@LERC.NASA.GOV>
Subject: FrontMost Windows Problems
Hello,
I have been using FrontMost quite a bit lately and while I like the idea,
it seems like there are lots of things that frustrate me. Are others having
problems also?
The worst problem I have is that in overriding the close handler for
windows, sometimes I goof up and there seems to be no way to quit the
script you created or even FrontMost since it keeps giving you an error
message everytime it tries to close the windows. These windows are
impossible to get rid of!!!
Thanks.
--
Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
sshws@convx1.lerc.nasa.gov
AppleLink: SCHILLING.H
=========================================================================
Date: Tue, 10 May 1994 13:08:07 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Doug Baron <userland@NETCOM.COM>
Subject: Re: Getting a list of Open Application in Frontier
In-Reply-To: <199405101741.KAA21432@mail.netcom.com> from "Lance Ware {VOXEL
Guru}" at May 10, 94 10:30:45 am
Here's how:
for ix = 1 to sys.countApps ()
name = sys.getNthApp (ix)
fspec = sys.getAppPath (name)
Obviously, you could put the resulting filespecs into a list, but you
usually wouldn't need to.
Doug
=========================================================================
Date: Tue, 10 May 1994 13:41:56 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Paul Farrah <paul_farrah1@QM.CLARIS.COM>
Subject: Re: FrontMost Windows Proble
Reply to: RE>FrontMost Windows Problems
> I have been using FrontMost quite a bit lately and while I like the idea,
>it seems like there are lots of things that frustrate me. Are others having
>problems also?
Ah, yes, Frontmost is quite a struggle, isn't it? If you have a close
handler, you must include a continue close in the handler, and I read
somewhere that the continue close statement MUST be the FIRST statement in
your close handler, otherwise you run into the problem you are experiencing.
I think there are some limitations in Frontmost that make it more of a
struggle than it needs to be. The problems I have quite often are making such
and such an object aware of other objects in a project. For example, if I
want the script of a window to know about a script I loaded in the project, I
have to pass the variable of the loaded script to the window's script so that
it can attach it to a property (or a variable). Also, it's quite a pain to
have to always open a window in order for the project to see the objects
within it (or even to see the window itself).
I'm working on an error handler script that has a simple debug window where I
can display handler names and parameter values at the entry and exit of every
handler. It's great for tracing variables and the execution path. It's
working very well, but I need to work out a few bugs. When I get it done,
I'll post it around.
-Paul
=========================================================================
Date: Tue, 10 May 1994 17:25:29 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Comments: <Parser> E: "From:"/"Sender:" field is missing.
From: Undetermined origin c/o Postmaster <POSTMASTER@DARTCMS1.BITNET>
Subject: Re: AS Kit differences
In-Reply-To: Your message of "Tue, 10 May 1994 08:47:46 MDT."
<9405101803.AA21269=DARTCMS1.DARTMOUTH.EDU!owner-macscrpt@HEARN.nic.SURFnet.nl
@
charon.cwi.nl>
Date: Tue, 10 May 1994 23:24:00 +0200
From: Peter de Waal <Peter.de.Waal@cwi.nl>
Benjamin Broder writes:
> Both kits include 4 800K disks (3 AppleScript + 1 FrontMost)
What exactly does Frontmost do?
--- Peter de Waal, CWI, Amsterdam ---
=========================================================================
Date: Tue, 10 May 1994 15:17:50 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Frederick <mfred@AMUG.ORG>
Subject: Re: AppleScript1.1 again
>> Aside from the person who said he convinced Apple to send it to him,
>> the only other way to get the Finder Scripting Extension is to buy the
>> AppleScript Scripter's Kit. Costs about $130-$150 from MacConnection and
>> other popular mail-order houses.
NO! The Scripter's Kit DOES NOT contain the scriptable Finder! The
AppleScript Developer's kit from APDA does.
Sorry about the vehemence, but I wasted $149 on the Scripter's Kit when I
discovered it had no CD-ROM and no Scriptable Finder. It only contains ASCR
1.1, Frontmost, and some sample scripts.
Boy, saving the world is hard work!
Matthew
------------------------------------------------------------------------------
The last guy on the planet to see the "Visualize Whirled Peas" bumper sticker.
------------------------------------------------------------------------------
Matthew Frederick, Phoenix, Arizona, USA (mfred@amug.org)
=========================================================================
Date: Tue, 10 May 1994 15:27:47 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: Re: FrontMost the saga
>What exactly does Frontmost do?
AppleScript applets have no inherent user interface. True you can have
dialog boxes query the user for information and you can control other
applications that have user interfaces but there is no user interface for
an applet, until ...
That's where FrontMost comes into play. FrontMost (or now FaceScan or some
equally yukky name like that) gives you windows and menus and fields and
buttons and all the elements that you would need to construct a user
interface, and it is all AppleScript controlled. FrontMost lets you build
an applet with a user interface.
As someone who used HyperCard to build all my one of a kind tools, AS 1.0
didn't offer me much since there was no way to interact with it. AS 1.1
with FrontMost allows me to build applets with a user interface. I can now
use AppleScript and FrontMost in place of HyperCard.
Kee Nethery
_________________________________________________________________
Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
=========================================================================
Date: Wed, 11 May 1994 11:34:57 +0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Craig Richmond <craig@ECEL.UWA.EDU.AU>
Subject: Re: AppleScript 1.1 vs. Easy Open 1.0.3
At 1:19 PM 10/5/94 -0400, Brian V. Hughes wrote:
> I'm been having one of the strangest conflicts since I received my
>8100 upgrade last month. For some reason there appears to be a conflict
>between Easy Open 1.0.3 and the Script Editor 1.1. Any scripts that I
>try to work with are formatted in a very screwed up manner. Things like
>one word per line, sometimes only a " on a line. It makes it impossible
>to work with unless I don't load the Easy Open extension. Has anyone
>seen or heard of this before? Anyone know of a fix, or a newer version
>of MEO? Thanks for the assistance.
That is very interesting. I had Easy Open installed to have a look at it.
I was also having problems with the Script editor in Native Mode, but not
emulated mode. I had finally had Easy Open do the wrong thing for me one
too many times (plus it had rarely actually done anything useful for me) so
I trashed it.
After being in 68000 for a couple of days, I swapped back to PPC and it was
all working. I assumed it must have been a phase of the moon bug, but now
that you have pointed this out, that was the only other real change that I
made!
I think we can safely say that Script Editor under PPC is broken with Easy
Open Installed.
Craig
--
Craig Richmond, Computer Officer, ECEL Computing Services +61 9 380 1405
The University of Western Australia or 380 3860 Email for FAX Number
craig@ecel.uwa.edu.au Dvorak Keyboards RULE! "Messes are only acceptable
if users make them. Applications aren't allowed this freedom" I.M.VI 2-4
=========================================================================
Date: Tue, 10 May 1994 21:27:51 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Brian Gaines <gaines@FSC.CPSC.UCALGARY.CA>
Subject: aete and miscellaneous events
Anybody come across this problem?
In my aete I have simple entries accepting the 'reqd', 'core' and 'misc'
event suites as a whole which according to IM IAC allows AppleScript to
pick up the terminology for the whole suite from the aeut resource. This
works fine for 'reqd' and 'core' but not for 'misc'. The strange thing
is that AppleScript understands the 'Do Script' terminology fine but not
'Cut', 'Paste', 'Show', etc, but the "Open Script" facility of the script
editor shows none of these including "Do Script". Is this some peculiarity
of AppleScript that does not conform to IM IAC, or am I missing something?
b.
Brian Gaines Knowledge Science Institute, University of Calgary
gaines@cpsc.ucalgary.ca Calgary, Alberta, Canada T2N 1N4
=========================================================================
Date: Tue, 10 May 1994 22:11:32 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: AppleScript1.1 again
>NO! The Scripter's Kit DOES NOT contain the scriptable Finder! The
>AppleScript Developer's kit from APDA does.
>
>Sorry about the vehemence, but I wasted $149 on the Scripter's Kit when I
>discovered it had no CD-ROM and no Scriptable Finder. It only contains ASCR
>1.1, Frontmost, and some sample scripts.
There are 2 versions of the Scripter's Kit. The one with FrontMost does
not contain the Scriptable Finder. The one with FaceSpan (FrontMost
renamed) includes the Scriptable Finder.
Needless to say, this sucks. Especially if you get the old one.
>Boy, saving the world is hard work!
You got that right!
Jon
=========================================================================
Date: Tue, 10 May 1994 22:11:38 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: aete and miscellaneous events
>In my aete I have simple entries accepting the 'reqd', 'core' and 'misc'
>event suites as a whole which according to IM IAC allows AppleScript to
>pick up the terminology for the whole suite from the aeut resource. This
>works fine for 'reqd' and 'core' but not for 'misc'. The strange thing
>is that AppleScript understands the 'Do Script' terminology fine but not
>'Cut', 'Paste', 'Show', etc, but the "Open Script" facility of the script
>editor shows none of these including "Do Script". Is this some peculiarity
>of AppleScript that does not conform to IM IAC, or am I missing something?
There is no Misc suite. It's actually called Miscellaneous Standard
Events. There is a Rez file on the AppleScript CD which has all the Misc
events defined so that you can copy and paste them into your suites.
They're not hard to recreate though, so just put them into your suite. I
think Do Script is probably already defined in the AppleScript suite or
somewhere like that.
Jon
=========================================================================
Date: Wed, 11 May 1994 08:59:08 +0100
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Johan Solve <johan.solve@ITN.HH.SE>
Subject: Re: FrontMost Windows Problems
Could we see some example scripts involving FrontMost?
_______________________________________________________________________
"
JOHAN SOLVE Department of Science and Technology
<johan.solve@itn.hh.se> Halmstad University, Sweden
=========================================================================
Date: Wed, 11 May 1994 05:41:52 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Peter de Waal <Peter.de.Waal@CWI.NL>
Subject: Re: FrontMost the saga plus a AS 1.1 question
In-Reply-To: Your message of "Tue, 10 May 1994 15:27:47 MDT."
<9405110458.AA28991=DARTCMS1.DARTMOUTH.EDU!owner-macscrpt@HEARN.nic.SURFnet.nl
@
charon.cwi.nl>
Date: Wed, 11 May 1994 11:39:34 +0200
Sender: Peter.de.Waal@cwi.nl
In message <9405110458.AA28991=DARTCMS1.DARTMOUTH.EDU!owner-macscrpt@HEARN.nic.
SURFnet.nl@charon.cwi.nl>you write:
> >What exactly does Frontmost do?
> That's where FrontMost comes into play. FrontMost (or now FaceScan or some
> equally yukky name like that) gives you windows and menus and fields and
> buttons and all the elements that you would need to construct a user
> interface, and it is all AppleScript controlled. FrontMost lets you build
> an applet with a user interface.
Is there documentation available on Frontmost?
On a related matter: I installed AS 1.1 from the MacHTTP package last
night, but now the Script Editor does not recognize dictionaries any
more. If I try to open the dictionary of an osax or of a scriptable
application, I get an error message saying that the required resources
are missing from the extension or application.
I'm running this on a Performa 400. I removed AS 1.0 and the Apple
Event manager extensions from my system folder, and replaced the
scripting additions with those that came with the HTTP package.
Is there a know conflict between AS 1.1 and the Script Editor that
ships with 1.0?
I also noticed that during startup I get an icon for Apple Event
Manager (although such an extension no longer exists) and that the
icon of frontmost is placed in front of the AS 1.1 icon. Is this
normal?
--- Peter de Waal, CWI, Amsterdam <Peter.de.Waal@cwi.nl> ---
=========================================================================
Date: Wed, 11 May 1994 08:18:56 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Herb Schilling <hschilling@LERC.NASA.GOV>
Subject: Re: FrontMost Windows Proble
Paul,
Thanks for the reply.
>Paul Farrah <paul_farrah1@QM.CLARIS.COM> wrote:
>Ah, yes, Frontmost is quite a struggle, isn't it? If you have a close
>handler, you must include a continue close in the handler, and I read
>somewhere that the continue close statement MUST be the FIRST statement in
>your close handler, otherwise you run into the problem you are experiencing.
>
Where did you read that ? I have been doing otherwise and at least this has
not caused be problems.
>I think there are some limitations in Frontmost that make it more of a
>struggle than it needs to be. The problems I have quite often are making such
>and such an object aware of other objects in a project. For example, if I
>want the script of a window to know about a script I loaded in the project, I
>have to pass the variable of the loaded script to the window's script so that
>it can attach it to a property (or a variable). Also, it's quite a pain to
>have to always open a window in order for the project to see the objects
>within it (or even to see the window itself).
>
Yes, yes, yes!!! I am running into the same problems.
>I'm working on an error handler script that has a simple debug window where I
>can display handler names and parameter values at the entry and exit of every
>handler. It's great for tracing variables and the execution path. It's
>working very well, but I need to work out a few bugs. When I get it done,
>I'll post it around.
Thanks for the offer. I look forward to it.
It's such a shame that we have these problems since I really want to use
FrontMost for quickly prototyping an app. I thought I could whip up the UI
quickly to test with users but all my problems FrontMost are making me
second guess my decision. I guess we should not expect too much from a
version 1.0 app.
I have run into all these problems while trying to do a ( I thought ) very
simple thing. I want to have a non-modal dialog window that the user can
make visible and hide. There should be only copy of this window at any one
time and the position,etc... of the window should be the same when the user
re-opens it as when it was closed. The window should visibility and
position should also be maintained from app launch to app launch. I am
getting closer to make this work but it has taken me about 12 hours and
lots of head scratching. I thought this would be easy. ( Famous last words.
)
--
Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
sshws@convx1.lerc.nasa.gov
AppleLink: SCHILLING.H
=========================================================================
Date: Wed, 11 May 1994 13:24:59 +0000
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mark Armitage <armitage@MARKSMAC.DEMON.CO.UK>
Subject: AS 1.1
Help,
I bought the runtime version of AS 1.0 and got the new Event Manager and AS
extension (1.0.3 & 1.1 respectively) from the MacHTTP package. All works
okay EXCEPT if I try to use the Script Editor to open up a programs
dictionary at which point I get an error meesage - something about not
being able to find a required resource! Can anyone help me? Does this
mean that I need an update to the Script editor as well (I don't suppose
anyone out there knows where I can get one for free do they?). Ah if only
I could afford the CD all would be right with the world (and I would have a
scriptable finder which is something else I would really like to get my
mitts on).
Hope someone out there can help me,
Thanks in advance,
Mark.
-------------------------------------------------------------------------------
-
Mark Armitage armitage@marksmac.demon.co.uk
Please reply directly - my newsreader is a pain...
-------------------------------------------------------------------------------
-
=========================================================================
Date: Wed, 11 May 1994 09:09:25 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: George Brown <george@PARTECH.COM>
Organization: PAR Government Systems Corp
Subject: Re: Scripts for searching files
In article <9405101427.AA18634@partech.com>, you wrote:
> Hello. Please forgive this novice on the list or point me with a flame to
> the nearest AppleScript FAQ.
>
> I'm looking for information on how to write an AppleScript which will
> search a text file for a character string, and then return the line(s)
> containing that string to the user (a la "grep"). I would like to get such
> a script to work in conjunction with MacHTTP to provide for searchable
> files, like phonebooks. I've looked at the sample script provided with
> MacHTTP, which teaches me how to accept a character string for which to
> search, but cannot figure out how to then look for this string in a text
> file.
Not that this will help you learn AppleScript, but a program called MacGREP
will do what you want. The POC is:
Ken R. Lunde
klunde@macc.wisc.edu
All depends what you want more, to learn AS or search files with regular
expressions. Hope this helps...
--
george@partech.com
George Brown
PAR Government Systems Corp.
220 Seneca Turnpike
New Hartford, NY 13413
=========================================================================
Date: Wed, 11 May 1994 08:55:38 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: FrontMost the saga plus a AS 1.1 question
In-Reply-To: <no.id> from "Peter de Waal" at May 11, 94 05:41:52 am
--Peter de Waal wrote:
>
>Is there documentation available on Frontmost?
To get the manual, which is called AppleScript Building Interfaces,
you have to buy either the Scripter's Kit ($140 at MacConnection) or the
Developer's Kit ($199 from APDA).
>On a related matter: I installed AS 1.1 from the MacHTTP package last
>night, but now the Script Editor does not recognize dictionaries any
>more. If I try to open the dictionary of an osax or of a scriptable
>application, I get an error message saying that the required resources
>are missing from the extension or application.
Hmm... I have no idea why this would be happening. Are you sure you
have version 1.1 of the Script Editor? You could run into all kinds of
problems if you try to use SE 1.0 with AS 1.1.
>I'm running this on a Performa 400. I removed AS 1.0 and the Apple
>Event manager extensions from my system folder, and replaced the
>scripting additions with those that came with the HTTP package.
>Is there a know conflict between AS 1.1 and the Script Editor that
>ships with 1.0?
It seems I need to read ahead in articles before I post. ;-> I don't
know of any known conflicts (Mr. Pugh might), but I would think that
this is the root of your current problem.
>I also noticed that during startup I get an icon for Apple Event
>Manager (although such an extension no longer exists) and that the
>icon of frontmost is placed in front of the AS 1.1 icon. Is this
>normal?
Well, seeing the AEM icon is normal since the AS 1.1 extension also
contains the AEM, however, I'm kind of surprised that the Fronmost icon
(please note the spelling and capitalization. It's not spelled
FrontMost, although the new product is spelled FaceSpan ;) would appear
before the AS icon. Do you have anything managing your inits? I would
check it to see how it's trying to load things.
-Hades
=========================================================================
Date: Wed, 11 May 1994 09:14:26 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Harrison, Jim" <Harrison.Jim@TMC.TULANE.EDU>
Subject: Re: FrontMost the saga plus a AS 1.1 question
Peter de Wall and Brian Hughes wrote:
>>On a related matter: I installed AS 1.1 from the MacHTTP package last
>>night, but now the Script Editor does not recognize dictionaries any
>>more. If I try to open the dictionary of an osax or of a scriptable
>>application, I get an error message saying that the required resources
>>are missing from the extension or application.
>
> Hmm... I have no idea why this would be happening. Are you sure you
>have version 1.1 of the Script Editor? You could run into all kinds of
>problems if you try to use SE 1.0 with AS 1.1.
I've seen this, too. Script Editor 1.0.1 that shipped with AS 1.0 does not
appear to be compatible with the AS 1.1 extension. Removing AS 1.1 and
reinstalling the AS 1.0 extension recovers the ability to view dictionaries.
Currently, the key to upgrading to 1.1 seems to be finding Script Editor 1.1.
I'm resigned to watching the mail for the upgrade disk from Danny Goodman's
book.
Jim Harrison
Tulane University
New Orleans
=========================================================================
Date: Wed, 11 May 1994 09:54:56 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Paul Farrah <paul_farrah1@QM.CLARIS.COM>
Subject: Re: FrontMost Windows Probl
Reply to: RE>>FrontMost Windows Proble
>>If you have a close
>>handler, you must include a continue close in the handler, and I read
>>somewhere that the continue close statement MUST be the FIRST statement in
>>your close handler, otherwise you run into the problem you are
experiencing.
>
>Where did you read that ? I have been doing otherwise and at least this has
>not caused be problems.
Sorry, turns out I wasn't exactly correct about the continue close handler.
The info about continue close is in a scriptable text editor document named
"Frontmost Release Notes". I'm using a copy of Frontmost that was purchased
by the company I work for, so I'm not sure where the release notes came from
(i.e., what "developers kit" they came with). Here's the content of the
release notes:
---------------------
Addendum to the Frontmost(tm) Manual & Useful Hints
Animated buttons: the "by swap" hilite style
Any icon can be used as a button, but if its hilite style is set (by way of a
script or the message box) to "by swap", then it will use its assigned
artwork as its unhilited display, and the artwork with an id that is 1
greater as its hilited display.
Scrolling panes: scrollable box objects
A window can have one scroll pane made from a box object. First establish the
window items that are to be within the scroll pane, then draw a box the size
of the intended scroll pane. Next, using the message box or a script, set the
"scrollable" property of the box to true, at which moment vertical and
horizontal scrollbars will become visible, and the window items will
disappear from around the box; the window items can then be seen only by
scrolling the box. The scrollpane "contains" all window items whose index
numbers are less than its own. Scrolling the pane sends the box a "scrolled"
event; you can get and set the "scroll" property, which is a point (a list of
two short integers) whose units are pixels. A box made into a scroll pane
cannot have a title or a zero-size pen. The box can be set as the growitem of
the window.
Tabbed listboxes and labels
A label, or entries in listbox that has the form "ListWithMetas", can have
tab stops. The format is:
tab<dd<text tab<dd<text ...
where "tab" means a real tab character, "dd" is a two-digit tab-stop, "<"
tells the direction of the tab, and "text" represents your text for display.
The two digits are expressed as the number of inches (first digit) and the
number of ninths of an inch (second digit). A ninth of an inch is the same as
spacing as the snap-to grid in the window editor. The direction indicators
are: "<" for a left tab, ">" for a right tab, and "^" for a centered tab. The
tab character can be entered in one of two ways: (1) If you are assigning the
contents via a script, type "\t" where you want the tab, or concatenate one
with the "tab" predefined variable. (2) If you are typing the contents
directly into the object, open the "Key Caps" desk accessory, click the Tab
key on the displayed keyboard, then select and copy the tab character out of
the text box. The "Lists" demo project includes examples of a tabbed label
and list.
Continue events
The standard messages whose names are in the past tense are "notifications"
of events that have already occurred. Examples are "scrolled" and "hilited".
Messages whose names are in the present tense are events about to occur or
now occurring. Examples of these are "close" and "keystroke". If you write a
handler for this latter kind of message, you MUST include a "continue
<message> <parameters>" statement if you wish the default behavior of the
event to occur (you might not.) You can put the "continue" at the beginning
or end of the handler, depending upon whether you want the default behavior
to occur before or after your script.
Window Properties Persist after Continuing Close
In a window's close handler, properties of the window and its objects are
still accessable after a 'continue close' statement has been executed. The
Music Collection (client-server) sample app makes use of this to insure that
the window contents are saved if changes were made to the window data when
the application was quit.
on close theObj
continue close theObj
update()
end close
The update handler checks a boolean property indicating whether the window
was "dirty" in which case the altered data will be transferred from the
window items back to the database. This update check must occur after the
close message is continued, since the "dirty" property may not get set until
frontmost itself sees the close message.
Quit event is deferred
The "quit" command generates a quit event, but the ultimate effect of that
event is deferred until the script that contains the command runs to
completion. For example, you might want to display a dialog, asking the user
if he wishes to run or quit, then act on that wish (note that the Welcome
window must be modal for this example to work):
--Open the welcoming dialog, letting the user run or quit:
open window "Welcome" returning {closing item:theItem}
This binds the variable 'theItem' to the closing item's description.
if title of theItem is "OK" then
open window "Untitled"
else if title of theItem is "Cancel" then
quit
end if
This script will continue to run in response to the quit handler, and will
not terminate the application until the script is finished. Any commands
following this sequence will be executed.
Removing text styles
To remove styles or to be sure that text is assigned without styles, copy it
"as string", as in "(contents of textbox 1) as string".
Multiple growitems
If you set a textbox as the growitem of a window, and want another object to
grow with it, align the right (or bottom) edge of the object with the right
(or bottom) edge of the growitem. But note that the "right edge" of a
textbox, for the purpose of alignment with the growitem, is the actual right
edge minus 15 pixels (for the scrollbar). The same is true of listboxes.
The "make" hierarchy
A window may not have items added with the make command if it is in the midst
of executing any scripts. In practical terms this means that a window cannot
add items to itself, nor may a script which is called by the window. Other
windows may indeed do so, however.
Movie with no artwork (yet)
You might wish to create a QuickTime movie object whose artwork property is
none--perhaps a movie browser. To do so, you must initially specify a movie,
then set the artwork to none. When the object is drawn, a dialog asks you to
specify a movie; do so. Then open the Message window, and type a command like
this:
set the artwork of movie 1 to none
Recovery after a system crash
While you work on a project, Frontmost maintains an invisible temporary file
that holds your recent changes. If your computer crashes for any reason, upon
restart there will be items in the Trash. That temporary file will be among
them. Its name will be changed to a large number, but it is a genuine
Frontmost project that can be opened and saved under a new name.
Use properties, not global variables
If you want to share data between different scripts in the project, use
properties. Global variables are accessible only in the script in which they
are defined. Properties can be accessible from anywhere. For example, if
the project script contains a property called theProp:
property theProp : "this is theProp"
this property is accessible from any window or window item script by using
the keyword "my". For example, from a button script,
display dialog my theProp
Using 'my' means that Frontmost will look first in the window item script,
then the window script, then the project script for a property called
theProp. If it is not found in any of those scripts, an error will result.
If you want to access a property of a different window or window item than
the one you're in, you can refer to it this way:
get theProp of window "Other"
Sample Frontmost Application Notes
o The dialog server tester script has a minor change from listing in the
manual. The statement: closeDialogServer() has been moved outside of the if
statement so that it is always executed before the script is finished. This
fixes a bug that normally allowed the dialog server to stay open.
o If droppable Frontmost applications (those having an open handler in the
project script) do not highlight and launch when files are dropped on them,
you should rebuild your desktop file.
o The window title string and the font menu are not readable because it comes
out in a roman font. The reason why is that Frontmost force to set the font
to Chicago.
=========================================================================
Date: Wed, 11 May 1994 12:40:25 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Shannon V Spires <svspire@SOMNET.SANDIA.GOV>
Subject: Frontmost Questions
In-Reply-To: <199405111703.LAA08365@somnet.sandia.gov> from "Paul Farrah" at
May 11, 94 09:54:56 am
1) Can Frontmost create hierarchical menus? I can't figure out
how to do it, and the manual doesn't say squat about them.
2) Can a script in Frontmost send a value out to the message
windoid, like you can in Hypercard? This would sure help
debugging (I know about copying things to a "debugging" field,
but you can't send out things that aren't coercible to strings.)
Thanks,
Shannon
svspire@sandia.gov
=========================================================================
Date: Wed, 11 May 1994 14:37:46 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Shannon V Spires <svspire@SOMNET.SANDIA.GOV>
Subject: Frontmost Questions (A)
In-Reply-To: <199405111703.LAA08365@somnet.sandia.gov> from "Paul Farrah" at
May 11, 94 09:54:56 am
Never mind--I called SDU and got the answers to my questions.
They are both "NO". You cannot create heirarchical menus with
Frontmost and you cannot output anything to the message
window.
-Shannon
svspire@sandia.gov
=========================================================================
Date: Wed, 11 May 1994 15:05:54 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Paul Farrah <paul_farrah1@QM.CLARIS.COM>
Subject: Re: Frontmost Questions (A)
Reply to: RE>Frontmost Questions (A)
Shannon writes:
>I called SDU and got the answers to my questions.
>They are both "NO". You cannot create heirarchical menus with
>Frontmost and you cannot output anything to the message
>window.
Actually, it is possible to send output to the message window, but the data
has to be of class string (quite a limitation for debugging purposes). Try
this:
set the contents of window item 6 of window "Message" to "You can do it."
This hits the top box of the message window. Window item 7 is the lower box.
You have to be in script execution mode (i.e., NOT in window design mode) for
this to work, but that's probably what you want anyway. I don't imagine it
would work if you are running a compiled application because the message
window probably wouldn't be copied to your application. Try it out. (This
could be a great aid to debugging; I don't know why SDU wouldn't want their
end users to know about this.)
If you want to make your own message window for debugging purposes, you can
get AppleScript to execute whatever message you type by running the string as
a script. For example, say you have a window named "My Message Window" with a
textbox named "message". This code will execute whatever you enter into the
textbox:
run script ((contents of textbox "message" of window "My Message Window")
as string)
Hope this all helps.
-Paul
=========================================================================
Date: Wed, 11 May 1994 17:52:54 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Shannon V Spires <svspire@SOMNET.SANDIA.GOV>
Subject: Frontmost: Output to Message Window
In-Reply-To: <199405112342.RAA28427@somnet.sandia.gov> from "Paul Farrah" at
May 11, 94 03:05:54 pm
Paul Farrah writes-
> Actually, it is possible to send output to the message window, but the data
> has to be of class string (quite a limitation for debugging purposes). Try
> this:
>
> set the contents of window item 6 of window "Message" to "You can do it."
>
etc...
Thanks a lot! It works. I had tried something like this before but the
critical "item 6" was the part I needed.
-Shannon Spires
svspire@sandia.gov
=========================================================================
Date: Thu, 12 May 1994 10:25:48 +1000
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Neville Smythe <Neville.Smythe@ANU.EDU.AU>
Subject: Recordable apps
There has been some comment about the paucity of recordable apps, a problem
for those wanting to learn how to script an app. It's also a problem for
programmers, since there are so few examples of the best way to record
events so that they can be most conveniently used.
I have an almost finished new version of ANUGraph, a mathematical function
plotting program, which will be fully recordable. It's still too buggy to
put up a demo on gaea yet, but if anyone is interested in seeing it , in
return for some feedback on the ae facilities provided (delta-testing?)
please contact me.
$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?
Neville Smythe Neville.Smythe@anu.edu.au
Mathematics Department
School of Mathematical Sciences
Australian National University Tel: (06)-249 2709
Canberra ACT 0200 AUSTRALIA FAX: (61-6)-249 5549
$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%?
=========================================================================
Date: Wed, 11 May 1994 20:59:02 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Script Ed Dictionary vs PowerMac Virtual Mem
On my Power Mac, I find the AppleScript Script Editor's Dictionary to be
somewhat unstable with virtual memory turned on (as virtual memory should
be on a Power Mac). By definition (almost...it ships with Power Macs) I am
running AppleScript 1.1.
The problem I see comes with larger 'aete' resources. For instance, after
startup up Script Editor, the first time I look at HyperCard 2.2's
Dictionary, the window has no contents. The second and subsequent times,
the events and classes are present, but the Suite headings are missing.
With Virtual Memory off, all is well.
Do I share this experience with others here? --John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Thu, 12 May 1994 07:44:25 +0000
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Wagner Luiz Truppel <wlt@MERCURIO.UC.PT>
Subject: Danny Goodman's book - a question
Hi folks,
I have just signed on and I already need some help. Could someone tell me
the ISBN number of Danny Goodman's book on AppleScript? Actually, could
someone send the whole info, that is, title, publisher and ISBN? I'm asking
a friend in the US to purchase it for me but he's having trouble finding
it. This is sort of urgent, since my friend is leaving the US this Friday.
Thanks a lot.
Wagner Luiz Truppel
WLT@MERCURIO.UC.PT
=========================================================================
Date: Wed, 11 May 1994 22:58:37 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Frederick <mfred@AMUG.ORG>
Subject: Re: FrontMost Windows Problems
> I have been using FrontMost quite a bit lately and while I like the idea,
>it seems like there are lots of things that frustrate me. Are others having
>problems also?
FrontMost has about 10 million problems. I understand that Software Designs
Unlimited (the creators of FrontMost) have a new version out, called
FaceSomething (the "Something" part is unknown to me).
I don't know how to get ahold of them, though, so I don't know how much
this "update" helps, or what it might cost.
Does anyone know how to reach SDU?
Matthew
------------------------------------------------------------------------------
The last guy on the planet to see the "Visualize Whirled Peas" bumper sticker.
------------------------------------------------------------------------------
Matthew Frederick, Phoenix, Arizona, USA (mfred@amug.org)
=========================================================================
Date: Thu, 12 May 1994 03:41:33 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Brian Hutchison <brian@HARPO.AMPR.AB.CA>
Subject: Re: Danny Goodman's book - a question
>I have just signed on and I already need some help. Could someone tell me
>the ISBN number of Danny Goodman's book on AppleScript? Actually, could
>someone send the whole info, that is, title, publisher and ISBN? I'm asking
>a friend in the US to purchase it for me but he's having trouble finding
>it. This is sort of urgent, since my friend is leaving the US this Friday.
>Thanks a lot.
Title: The Complete AppleScript Handbook
Author: Danny Goodman
Publisher: Random House, Inc.
ISBN: 0-679-79148-5
Hope this helps!
- Brian Hutchison
brian@harpo.ampr.ab.ca
=========================================================================
Date: Thu, 12 May 1994 02:51:08 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Frederick <mfred@AMUG.ORG>
Subject: Re: Danny Goodman's book - a question
>...Could someone tell me
>the ISBN number of Danny Goodman's book on AppleScript? Actually, could
>someone send the whole info, that is, title, publisher and ISBN?
-- From the inside of the second page of the book:
The Complete AppleScript Handbook by Danny Goodman
Copyright 1993 by Danny Goodman
Published in the United States by Random House, Inc., New York, and
simultaneously in Canada by Random House of Canada, Limited.
First Edition
ISBN 0-679-79148-5
-- Additionally, just in case:
UPC 9 780679 791485 53500
Hope that helps!
------------------------------------------------------------------------------
The last guy on the planet to see the "Visualize Whirled Peas" bumper sticker.
------------------------------------------------------------------------------
Matthew Frederick, Phoenix, Arizona, USA (mfred@amug.org)
=========================================================================
Date: Thu, 12 May 1994 06:37:31 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Herb Schilling <hschilling@LERC.NASA.GOV>
Subject: Re: FrontMost Windows Problems
>> I have been using FrontMost quite a bit lately and while I like the idea,
>>it seems like there are lots of things that frustrate me. Are others having
>>problems also?
>
>
>FrontMost has about 10 million problems. I understand that Software Designs
>Unlimited (the creators of FrontMost) have a new version out, called
>FaceSomething (the "Something" part is unknown to me).
>
I would like to know about this !!!
>I don't know how to get ahold of them, though, so I don't know how much
>this "update" helps, or what it might cost.
>
>Does anyone know how to reach SDU?
>
Their Applelink address is SDU. I just sent them a link asking them about
FaceSpan. I will report to the mailing list the response I get.
--
Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
sshws@convx1.lerc.nasa.gov
AppleLink: SCHILLING.H
=========================================================================
Date: Thu, 12 May 1994 08:53:19 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Script Ed Dictionary vs PowerMac Virtual Mem
In-Reply-To: <no.id> from "John W. Baxter" at May 11, 94 08:59:02 pm
--John W. Baxter wrote:
>
>On my Power Mac, I find the AppleScript Script Editor's Dictionary to be
>somewhat unstable with virtual memory turned on (as virtual memory should
>be on a Power Mac). By definition (almost...it ships with Power Macs) I am
>running AppleScript 1.1.
Well, I had to go and turn on VM on my 8100, since I was running
without it. ;-> I think there might be some problems running Word with
VM turned on, but I'm not positive.
>The problem I see comes with larger 'aete' resources. For instance, after
>startup up Script Editor, the first time I look at HyperCard 2.2's
>Dictionary, the window has no contents. The second and subsequent times,
>the events and classes are present, but the Suite headings are missing.
>With Virtual Memory off, all is well.
Well, I've opened up just about every dictionary I've got, including
Stuffit Deluxe which has one of the biggest I've seen, and I don' have
the problem you describe. It could be something particular to HyperCard
2.2, but I haven't installed that in my Power Mac yet, so I can't check.
-Hades
=========================================================================
Date: Thu, 12 May 1994 09:45:56 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Eudora Script
Igor Livshits has contributed a Eudora script to gaea. Here's his
description...
>This script moves messages older than a set amount of days from the "Out"
>mailbox to the "Trash" mailbox. You may change the maximum age by holding
>the control key as the script starts.
You'll find it in
ftp://gaea.kgs.ukans.edu/applescript/scripts/TrashOldMessages.sit.hqx
Enjoy. Thanks, Igor!
pf
=========================================================================
Date: Thu, 12 May 1994 10:26:04 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Chris Garrigues <cwg@MCC.COM>
Subject: MIME messages on the list and digesifying
In-Reply-To: <9405120404.AA14396@turtle.mcc.com>
I read this list as a digest rather than as individual messages, and the
occasional binhex messages are rather annoying in the middle of a digest.
Is there any way I can get the digest to be sent to me as a MIME-compliant
digest (multipart/digest) so that when people send some binhex, my
mailreader won't show me all the encoded stuff on my way to the following
message?
Chris
Chris Garrigues (MIME capable) cwg@mcc.com
Microelectronics and Computer Technology Corporation +1 512 338 3328
3500 West Balcones Center Fax +1 512 338 3838
Austin, TX 78759-5398 USA
=========================================================================
Date: Thu, 12 May 1994 11:14:29 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Shannon V Spires <svspire@SOMNET.SANDIA.GOV>
Subject: Re: FrontMost Windows Problems
In-Reply-To: <199405120600.AAA04544@somnet.sandia.gov> from "Matthew
Frederick" at May 11, 94 10:58:37 pm
> FrontMost has about 10 million problems. I understand that Software Designs
> Unlimited (the creators of FrontMost) have a new version out, called
> FaceSomething (the "Something" part is unknown to me).
>
> I don't know how to get ahold of them, though, so I don't know how much
> this "update" helps, or what it might cost.
>
> Does anyone know how to reach SDU?
Open up the about box and scroll to the bottom. Their applelink address is
sdu@applelink.apple.com
They told me a new version (now called FaceSpan for legal reasons) will
be out in about 2 months (!), from Apple. I'm about to bag Frontmost.
It's just too buggy to be usable, and I don't have time for them to
get their act together. Want some examples? Here:
FRONTMOST BUGS SO FAR (feel free to add your own):
1. Really wild global behavior. This is unpredictable and hard to
reproduce, but basically properties and globals declared in
the project script cannot be reliably read or written to in
the other scripts within the project. The release notes mention that
you should use properties instead of globals. What they fail to
mention is that properties are just as broken as globals. Basically,
there are no globals in Frontmost as it now exists. This makes it almost
impossible for separate widgets and windows of a project to
refer to the same data.
2. You cannot put a left parenthesis in a popup menu. It just disappears,
and causes the enabling of that item and successive items to change
unpredictably. You can put in a parenthesis item by item,
but not when you specify the menu contents as a whole.
3. You cannot create hierarchical menus, either in the menubar or
popup, with Frontmost.
4. Radio buttons function automatically, but they are automatically
grouped according to successive item numbers, which (of course) you
cannot change. Thus creating two separate groups of radio buttons
on the same window is at best tedious, especially if you change your
mind later. The proper way to group radio buttons is to create a property
for the buttons, into which you place a group identifier. Unfortunately,
SDU chose not to implement it this way.
5. You cannot use the message box as a "results" window, outputting
data to it for debugging the way you can with Hypercard or
the Script Editor. You can write strings to the message window,
but this is pretty limiting and it's undocumented.
6. Frontmost has basically no facilities for debugging. No tracer,
no stepper, no viewing of intermediate results, no nothing.
Time to go back to Hypercard.
-Shannon Spires
svspire@sandia.gov
=========================================================================
Date: Thu, 12 May 1994 12:11:36 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: Script Ed Dictionary
Two comments in this message...
>On my Power Mac, I find the AppleScript Script Editor's Dictionary to be
>somewhat unstable with virtual memory turned on (as virtual memory should
>be on a Power Mac). By definition (almost...it ships with Power Macs) I am
>running AppleScript 1.1.
>
>The problem I see comes with larger 'aete' resources. For instance, after
>startup up Script Editor, the first time I look at HyperCard 2.2's
>Dictionary, the window has no contents. The second and subsequent times,
>the events and classes are present, but the Suite headings are missing.
>With Virtual Memory off, all is well.
>
>Do I share this experience with others here? --John
Yes, but it isn't peculiar to the PowerMac. I noticed it on my Q800 a
while ago and reported it to the proper people (notably the author, Jens
Alfke) but he hasn't gotten back to me about the cause. He wanted to blame
someone else's code, but I suspect it has something to do with style
resources being unlocked. Do you have colors associated with the various
AppleScript elements?
As for a fix, don't expect one. Jens is working hard on OpenDoc and the
AppleScript group is down to 1 person. You gotta love Apple. ;(
I have found that simply closing and reopening the dictionary will fix the
problem for a while. That's another clue that it is memory related, as is
the VM problem.
Item #2:
>>I'm running this on a Performa 400. I removed AS 1.0 and the Apple
>>Event manager extensions from my system folder, and replaced the
>>scripting additions with those that came with the HTTP package.
>>Is there a know conflict between AS 1.1 and the Script Editor that
>>ships with 1.0?
>
> It seems I need to read ahead in articles before I post. ;-> I don't
>know of any known conflicts (Mr. Pugh might), but I would think that
>this is the root of your current problem.
I do in fact know what's happening. In 1.0, the Script Editor (and anyone
else who cared) had to open the AS component and read the aeut resource out
for themselves. This changed in 1.1 with the drop in dialect support. The
aeut is now in the dialect file and there is an event to ask AppleScript
for it. The SE 1.0.1 doesn't know about this event or the dialect files,
so it can't get the aeut to merge the app's aete with. SE 1.1 knows to get
the aeut from AS 1.0, but not the other way around.
So, don't use SE 1.0.1 with AS 1.1. A fairly cheap way to get AS 1.1 is to
call APDA and order the $20 diskette version. It's everything you need
except FaceSpam.
Jon
=========================================================================
Date: Thu, 12 May 1994 13:33:54 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Script Ed Dictionary
>>The problem I see comes with larger 'aete' resources. For instance, after
>>startup up Script Editor, the first time I look at HyperCard 2.2's
>>Dictionary, the window has no contents. The second and subsequent times,
>>the events and classes are present, but the Suite headings are missing.
>>With Virtual Memory off, all is well.
>>
>>Do I share this experience with others here? --John
>
>Yes, but it isn't peculiar to the PowerMac. I noticed it on my Q800 a
>while ago and reported it to the proper people (notably the author, Jens
>Alfke) but he hasn't gotten back to me about the cause. He wanted to blame
>someone else's code, but I suspect it has something to do with style
>resources being unlocked. Do you have colors associated with the various
>AppleScript elements?
Yes, I have colored some of the AppleScript syntax elements (seems useful,
in a language where a word may be a variable one place, and an
application-specific keyword a few lines down...more often in a different
script, of course). I also styled them enough so that when I was running
my IIci in black and white I could tell the langauge elements apart.
I have a hunch you are on the right track.
[I just doubled the Script Editor's partition (to 1,400K...that helped
some: now the HyperCard dictionary is empty the first time, and complete on
later tries.]
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Thu, 12 May 1994 16:41:06 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Comments: <Parser> E: "From:"/"Sender:" field is missing.
From: Undetermined origin c/o Postmaster <POSTMASTER@DARTCMS1.BITNET>
Subject: Re: Danny Goodman's book - a question
In-Reply-To: Your message of "Thu, 12 May 1994 02:51:08 MDT."
<9405121643.AA29887=DARTCMS1.DARTMOUTH.EDU!owner-macscrpt@HEARN.nic.SURFnet.nl
@
charon.cwi.nl>
Date: Thu, 12 May 1994 22:39:10 +0200
From: Peter de Waal <Peter.de.Waal@cwi.nl>
In message <9405121643.AA29887=DARTCMS1.DARTMOUTH.EDU!owner-macscrpt@HEARN.nic.
SURFnet.nl@charon.cwi.nl>you write:
> >...Could someone tell me
> >the ISBN number of Danny Goodman's book on AppleScript? Actually, could
> >someone send the whole info, that is, title, publisher and ISBN?
On a related matter, I am looking for the address of Random House. My copy
of the book did not come with the upgrade card for AS 1.1 and I'm planning to
write them about this. Weird as it may sound, Random House's address is
nowhere to be found in the entire book (Well, it says New York - Toronto
-..., but that won't get a letter delivered).
--- Peter de Waal, CWI, Amsterdam ---
=========================================================================
Date: Thu, 12 May 1994 17:08:45 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "William M. Porter" <WMPORTER@JETSON.UH.EDU>
Subject: Random House address
Peter de Waal asks for the address of Random House, publisher of
Goodman's *Complete AppleScript Handbook.* The user survey card in the
back of the book has the following address on it,
Random House Electronic Publishing
201 East 50th Street, 3rd Floor
New York, NY 10022
Of course, USA.
The international fax number, by the way, is 212-572-6045. That is given
on the sheet that includes the info on how to order the update. So you
might try faxing them your request with a credit card number. Just a
thought....
Will Porter / University of Houston
wmporter@jetson.uh.edu
=========================================================================
Date: Thu, 12 May 1994 18:12:01 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: revar design and consulting <revar@PHANTOM.COM>
Subject: frontmost problem
hi all,
I have a problem with frontmost. I have some scripts that run fine as
buttons, but when i copy and paste the save script in to a picture window
and tell the picture to think its a button, it hangs the script. The thing
that is hanging is a command to tell quickeys to do a quickey, which works
fine in a button script or from the script editor. An ideas? I would really
apreciate it.
Im not on the list yet so please respond directly to:
revar@phantom.com
=========================================================================
Date: Thu, 12 May 1994 20:00:52 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jonathan Bauer <jhbauer@PANIX.COM>
Subject: Re: Danny Goodman's book - a question
>
>On a related matter, I am looking for the address of Random House. My copy
>of the book did not come with the upgrade card for AS 1.1 and I'm planning to
>write them about this. Weird as it may sound, Random House's address is
>nowhere to be found in the entire book (Well, it says New York - Toronto
>-..., but that won't get a letter delivered).
Random House, Inc.
201 E. 50th St.
New York, N.Y. 10022
tel # 212-751-2600
Order Department:
4000 Hahn Road
Westminster, MD
tel # 301-848-1900
The above according to the Manhattan telephone directory.
----------------------------------
Jonathan Bauer <jhbauer@panix.com>
440 W. 41st St. #202
N.Y. N.Y. 10036
+1 212-239-5158
=========================================================================
Date: Thu, 12 May 1994 18:58:18 -0000
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Gateway <Gateway@LAMG.COM>
Organization: Los Angeles Macintosh Group BBS
Subject: NDN: Re: Danny Goodman's book - a question
Sorry. Your message could not be delivered to:
czweig,LAMG BBS (The name was not found at the remote site. Check that the
name has been entered correctly.)
=========================================================================
Date: Thu, 12 May 1994 22:43:19 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: FrontMost Problems
>Time to go back to Hypercard.
Amen. Hypercard is still an excellent place to do all your basic scripting
needs. You can mix and match all the OSA languages you have and HyperTalk.
I still do things in HyperTalk because it has many strengths, such as
string manipulation and text fields. Simply create a stack with the stack
script in AppleScript and start using it. Now you have a place to put your
AppleScript subroutines that you can call from HyperTalk buttons and the
like. You can also make buttons in AppleScript if that makes more sense.
I think AppleScript and Hypercard perform as well as Frontier. You still
can't step through AppleScript code, but at least it doesn't have all those
periods. ;)
Jon.I.thought.it.was.usenet.Pugh
=========================================================================
Date: Fri, 13 May 1994 09:03:20 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jaime Jouris <jaime@WORLD.STD.COM>
Subject: Re: FrontMost Windows Problems
In-Reply-To: <199405121716.AA17126@world.std.com>
On Thu, 12 May 1994, Shannon V Spires wrote:
> FRONTMOST BUGS SO FAR (feel free to add your own):
>
> 1. Really wild global behavior. This is unpredictable and hard to
> reproduce, but basically properties and globals declared in
> the project script cannot be reliably read or written to in
> the other scripts within the project. The release notes mention that
> you should use properties instead of globals. What they fail to
> mention is that properties are just as broken as globals. Basically,
> there are no globals in Frontmost as it now exists. This makes it almost
> impossible for separate widgets and windows of a project to
> refer to the same data.
Wow, I've been using Frontmost/Facespan for about six months now, working
on a commercial project and I've had no such problems. Admittedly,
globals don't work at all, but properties work just as I would expect
them to - As long as they are declared in the project script, they are
visible anywhere. Properties declared in other scripts have to be
accessed through their objects.
> 4. Radio buttons function automatically, but they are automatically
> grouped according to successive item numbers, which (of course) you
> cannot change. Thus creating two separate groups of radio buttons
> on the same window is at best tedious, especially if you change your
> mind later. The proper way to group radio buttons is to create a property
> for the buttons, into which you place a group identifier. Unfortunately,
> SDU chose not to implement it this way.
You CAN change the item numbers of radio buttons. Just edit the item
number in that floating palette thingy.
Frontmost may have glitches, but it still beats Hypercard hands down in
my opinion.
Jaime
jaime@world.std.com
=========================================================================
Date: Fri, 13 May 1994 10:42:47 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Shannon V Spires <svspire@SOMNET.SANDIA.GOV>
Subject: Re: FrontMost Windows Problems
In-Reply-To: <199405131346.HAA25110@somnet.sandia.gov> from "Jaime Jouris" at
May 13, 94 09:03:20 am
Jaime Jouris writes in response to my message:
> > 1. Really wild global behavior. This is unpredictable and hard to
> > reproduce, but basically properties and globals declared in
> > the project script cannot be reliably read or written to in
> > the other scripts within the project. The release notes mention that
> > you should use properties instead of globals. What they fail to
> > mention is that properties are just as broken as globals. Basically,
> > there are no globals in Frontmost as it now exists. This makes it almost
> > impossible for separate widgets and windows of a project to
> > refer to the same data.
>
> Wow, I've been using Frontmost/Facespan for about six months now, working
> on a commercial project and I've had no such problems. Admittedly,
> globals don't work at all, but properties work just as I would expect
> them to - As long as they are declared in the project script, they are
> visible anywhere. Properties declared in other scripts have to be
> accessed through their objects.
Our specific problem has been in regard to getting and changing property
values declared in the project script and accessed inside window item scripts.
I have some projects where it works just fine, but other projects that
are just a bit more complex where the inner script gets confused and
cannot figure out that (my propertyname) refers to the project's
property, not one belonging to the widget itself. Sometimes it gets
confused when reading the property; sometimes when it tries to change it.
> > 4. Radio buttons function automatically, but they are automatically
> > grouped according to successive item numbers, which (of course) you
> > cannot change. Thus creating two separate groups of radio buttons
> > on the same window is at best tedious, especially if you change your
> > mind later. The proper way to group radio buttons is to create a property
> > for the buttons, into which you place a group identifier. Unfortunately,
> > SDU chose not to implement it this way.
>
> You CAN change the item numbers of radio buttons. Just edit the item
> number in that floating palette thingy.
You're absolutely right. I had tried this before and it always went back
to the number it was set to before, but it seems that if there's enough
items already, it DOES change it. It also seems to change the item number
of the item which already has the new number you're typing in, so be
aware of this side effect. Thanks for setting me straight.
> Frontmost may have glitches, but it still beats Hypercard hands down in
> my opinion.
It has a lot more potential than Hypercard, but Hypercard is a stable
platform and Frontmost just isn't yet.
-Shannon
svspire@sandia.gov
=========================================================================
Date: Fri, 13 May 1994 10:55:08 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Shannon V Spires <svspire@SOMNET.SANDIA.GOV>
Subject: More Frontmost Problems
In-Reply-To: <199405120600.AAA04544@somnet.sandia.gov> from "Matthew
Frederick" at May 11, 94 10:58:37 pm
Here's a really cool Frontmost bug I forgot yesterday:
If you RUN a project that puts up a modal dialog and you forget
to create some kind of Quit handler for it, you're dead. Sunk.
Finis. You can't use the menus; you can't click Stop in the
control window. Cmd-period does nothing. You can type option-
cmd-shift-esc, which will nicely kill not only the running
project but also Frontmost as a whole, so if you haven't saved
your work, you're dead. Cool huh? It gets even better--even
if you avoid modal dialogs (like all good little user interface
designers are supposed to do ;-) , if Frontmost runs out of
memory, it puts up its OWN modal dialog which frequently won't
go away even if you click its OK button. Since it's modal, it
still nicely locks out the menus and the control window.
Moral: Increase the Frontmost memory allocation and always save
your work before Running a project.
Sorry if I sound like I'm just griping here. I think Frontmost
has a lot of potential--that's why we started using it in the
first place. I just wish they would clean it up so I don't have
to spend all my time on workarounds.
-Shannon
svspire@sandia.gov
=========================================================================
Date: Fri, 13 May 1994 16:47:13 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
Subject: Time Out
Time Out
I've got an AppleScript script that works on an FM Pro Database. Problem is
the database is fairly big, so it seems to time out after a while (AppleEvent
Timed Out). Now, I *know* the program works -- I exported 100 records from
the dbase (about 7300 records) and ran it on the smaller db, and it worked
flawlessly.
So what's causing this? Is there any way I can avoid it?
-roy
=========================================================================
Date: Fri, 13 May 1994 18:17:58 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Ray <daver@NETCOM.COM>
Subject: Re: Time Out
>Time Out
>I've got an AppleScript script that works on an FM Pro Database. Problem is
>the database is fairly big, so it seems to time out after a while (AppleEvent
>Timed Out). Now, I *know* the program works -- I exported 100 records from
>the dbase (about 7300 records) and ran it on the smaller db, and it worked
>flawlessly.
>
>So what's causing this? Is there any way I can avoid it?
Use the timeout command.
Tell app "Myapp"
do something
end tell
Normally you will get an apple event timeout if after 30 seconds
the "do something" statement isn't completed. (Technically, if an
apple event is not returned after 30 seconds). You can change this
30 second default by:
Tell app "Myapp"
with timeout of 300 seconds -- Change apple event time limit to 5 minutes
do something
end timeout
end tell
-Dave
------------------------------------------------------------------------------
David Ray Dream Designs Music Composition
daver@netcom.com PO Box 5631 Interactive Multimedia
510-527-9010 Berkeley CA 94705 Virtual Worlds
=========================================================================
Date: Fri, 13 May 1994 22:17:42 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: VictorOJ@AOL.COM
Subject: How?
How do you unsubscribe?
=========================================================================
Date: Fri, 13 May 1994 22:33:56 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Time Out
>Time Out
>I've got an AppleScript script that works on an FM Pro Database. Problem is
>the database is fairly big, so it seems to time out after a while (AppleEvent
>Timed Out). Now, I *know* the program works -- I exported 100 records from
>the dbase (about 7300 records) and ran it on the smaller db, and it worked
>flawlessly.
>
>So what's causing this? Is there any way I can avoid it?
FileMaker can be "a little" slow handling Apple events.
Immediate solution
with timeout of nnn seconds
your message to FileMaker goes here
end timeout
where nnn is some suitably large number (try 600 <10 minutes> or more to
start, since you already know that one minute is too short).
Longer-term solution: if possible, create a FileMaker script which does
the time-consuming job, and trigger that from your AppleScript script. You
can get some ***dramatic*** speedups this way (one example: a show xxx
taking about 4 minutes was effectively immediate as a FileMaker script).
There may also be a faster way to express the AppleScript form, if you
can't create a suitable FileMaker script.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Sat, 14 May 1994 13:45:05 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Brian Hall <mspace@NETCOM.COM>
Subject: Wanted: Comments on a new scriptable utility
Wanted:
Users of AppleScript/Frontier/etc to critique/comment on
scripting/recording support in a new communications utility.
Send name/address/email/other contact information and a brief description
of how you use scripting in your day to day activities to any of the below
email addresses.
Also specify what communictions you currently script and/or would like to
script. ie, voice, fax, data, email, paging, etc.
Thanks!
__________________________________________________________________________
Brian Hall Internet: mspace@netcom.com
Mark/Space Softworks AppleLink, AOL: MARKSPACE
Macintosh connectivity software. Goodies at ftp.netcom.com in pub/mspace
=========================================================================
Date: Sat, 14 May 1994 16:48:40 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Ray <daver@NETCOM.COM>
Subject: Re: Wanted: Comments on a new scriptable utility
>Users of AppleScript/Frontier/etc to critique/comment on
>scripting/recording support in a new communications utility.
Good. Sounds like me.
>Send name/address/email/other contact information and a brief description
>of how you use scripting in your day to day activities to any of the below
>email addresses.
David Ray
PO Box 5631, Berkeley, CA 94705
510-527-9010
daver@netcom.com
I use Applescript extensively, for my own daily computer use as well as
consulting jobs of writing scripts. Applications I have scripted include
Eudora, Filemaker Pro, Microphone Pro, Anarchie, Stuffit Deluxe, and others.
I have also used Applescript to control non-scriptable applications including
ZTerm and Fetch by using various scripting additions. I was also a beta
tester for the TCP/IP scripting addition by Atul Butte.
Some of my Applescript scripts and apps include:
Type/creator changer - Drag and drop file type/creator changer
Find string - Searches text files for a string, displays file name and line
number (similar to unix utility Grep)
Add to Apple Menu - Drag and drop a file to add an alias of it in the menu
InterSLIP Autodialer - Adds redial feature to InterSLIP
Get mail (ZTerm) - Downloads mail spool using unix shell and Zmodem
Get mail (Eudora) - Downlaods mail over a SLIP connection using Eudora
Sort E-mail - Sorts Eudora's "in" mail to other mailboxes for listserv use
Send Files - Stuffs, uploads and ftp's files in a folder to a remote ftp
site using Stuffit, Microphone Pro, unix shell, Zmodem
Get Sumex File - Retrieves a file on sumex-aim (or mirror site) with format
as used in comp.sys.mac.digest, uses Anarchie and TCP/IP.
Do script - Run this from OSA menu from any application, it will bring up
a diaog box to run an OSA script, then execute it and put the
result into the current application.
Oblique Strategies - Displays one of ~120 phrases/fortunes from Brian Eno's
Oblique Strategies
>Also specify what communictions you currently script and/or would like to
>script. ie, voice, fax, data, email, paging, etc.
Mostly Zmodem up/dowload, wait for"string"/send text"string2", for
unix shell commands, or TCP/IP based programs for e-mail, ftp, etc.
-Dave
=========================================================================
Date: Sun, 15 May 1994 15:26:00 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Dannette Coleman,
Keyano College (403) 791 4822" <S203022@ACAD.KEYANOC.AB.CA>
Subject: Remove from list
Please remove me from your mailing list. Thank you.
=========================================================================
Date: Sun, 15 May 1994 23:40:13 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Frederick <mfred@AMUG.ORG>
Subject: Re: More Frontmost Problems
>Here's a really cool Frontmost bug I forgot yesterday:
>
>If you RUN a project that puts up a modal dialog and you forget
>to create some kind of Quit handler for it, you're dead. Sunk.
>Finis. You can't use the menus; you can't click Stop in the
>control window. Cmd-period does nothing.
Here's a pretty simple solution that will quit the script but leave you in
FrontMost. Use OSA Menu for quick and easy access to running instant
scripts. Then write and compile this pup in Script Editor:
tell application "FrontMost"
quit
end tell
Save it in your "Universal Scripts" folder, and you're set.
Wisdom from someone who locks FrontMost up a dozen times every day!
Of course, there is SOME merit in saving your project before running it... ;)
Matthew
------------------------------------------------------------------------------
The last guy on the planet to see the "Visualize Whirled Peas" bumper sticker.
------------------------------------------------------------------------------
Matthew Frederick, Phoenix, Arizona, USA (mfred@amug.org)
=========================================================================
Date: Mon, 16 May 1994 10:38:30 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jonathan Bauer <jhbauer@PANIX.COM>
Subject: AppleScript & MIDI
Does anyone know if AppleScript will interact with either the Apple MIDI
Manager or the Opcode MIDI System (OMS)? Specifically, is there a way to
get AS to recognize MIDI data?
For example, can I have MIDI 'note on' (or program change, or whatever)
signal sent from a remote computer and interpreted by AppleScript to
trigger a macro or have another application open a file?
The problem arises because ethernet and appletalk conflict with MIDI and
thus there is no way to have a network running at the same time as any
software that requires MIDI. The project I am working on must run on two
separate computers (one of the applications will not function in the
background) and the applications must communicate.
thanks,
/jonathan
----------------------------------
Jonathan Bauer <jhbauer@panix.com>
440 W. 41st St. #202
N.Y. N.Y. 10036
+1 212-239-5158
=========================================================================
Date: Mon, 16 May 1994 10:46:38 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Herb Schilling <hschilling@LERC.NASA.GOV>
Subject: Frontmost: How to detect drag in list?
Hello,
Frontmost allows you to drag items in a list. Unfortunately, I don't see
any way to detect this. There is no "drag" handler. I need to keep my list
order in sync with another part of my GUI. Is there a way to do this ? I
can only think of using idle handlers.
--
Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
sshws@convx1.lerc.nasa.gov
AppleLink: SCHILLING.H
=========================================================================
Date: Mon, 16 May 1994 14:51:15 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: revar design and consulting <revar@PHANTOM.COM>
hi all I have a few specific questions.
first off is there a scriptable screen capture utility avaliable? id like
to be able to specify where it captures by cordinates of the screen.
the second question is how do i determine the path of an open file. I know
i can get the path by opening the file with choose file, but id like to
figure out a get path command for and open file so i can do a save as to a
different folder location which depends on the path of the original file.
thanks for the help
revar@panix.com
*******************************************************************************
*
revar@phantom.com
revar@panix.com
"talk" me at-revar@dialup.access.net
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.3
mQBPAi3TYkcAAAECALROm3qC8ss4o12Yvoai1FtvzcunehnLJCq49wZ9tMLqdGfaBP7VhjwVK8bD
Hn48ml4OVowDl7icNROk9pllLFUAEQEAAbABh7QXcmV2YXIgPHJldmFyQHBhbml4LmNvbT6wAQM=
=iRRZ
-----END PGP PUBLIC KEY BLOCK-----
=========================================================================
Date: Mon, 16 May 1994 17:23:57 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Herb Schilling <hschilling@LERC.NASA.GOV>
Subject: Script handlers strangeness in Frontmost
Hello,
Can anyone out see what I am doing wrong or if I am not can they give a
work around for what I want to do?
I am trying to call a handler of a script object I created at the
application level from a window script. The call to the handler in the
script object is fine but when I call another handler in the same script
object from the handler, Frontmost tells me that the <<script>> does not
know how to handle the message, PrivateRoutine. Somehow, I have a feeling
that the call to PrivateRoutine is being done in the context of the window
script so it never gets to the thing1 object but this is a guess and I
don't see why this should be so.
===========================
In application script
===========================
on run()
set thing1 to CreateThing()
end run
on CreateThing() -- "constructor" of thing
script thing
on PrivateRoutine()
-- do something
end PrivateRoutine
on PublicRoutine()
PrivateRoutine()
end PublicRoutine
end script
end CreateThing
===========================
In window script
===========================
tell my thing1 to PublicRoutine()
--
Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
sshws@convx1.lerc.nasa.gov
AppleLink: SCHILLING.H
=========================================================================
Date: Mon, 16 May 1994 14:54:17 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Paul Farrah <paul_farrah1@QM.CLARIS.COM>
Subject: Re: Script handlers strangen
Reply to: RE>Script handlers strangeness
In response to Herb Schilling:
> I am trying to call a handler of a script object I created at the
> application level from a window script. The call to the handler in the
> script object is fine but when I call another handler in the same script
> object from the handler, Frontmost tells me that the <<script>> does not
> know how to handle the message, PrivateRoutine. Somehow, I have a feeling
> that the call to PrivateRoutine is being done in the context of the window
> script so it never gets to the thing1 object but this is a guess and I
> don't see why this should be so.
Very frustrating bug and difficult to track down, isn't it? Here's a
workaround that works for me. You can pass the script object to an "init"
handler (or whatever you want to call it) in your window's script, and then
have your window's init handler assign the parameter to a "local" property.
For example, after calling CreateThing, send a message like this to your
window:
tell window "mywindow" to init given theScript:thing1
...where window "my window" contains the following code
property localThing:{} -- bogus initial value
on init given theScript:theScriptObject
set my localThing to theScriptObject
end init
Then, to access the handlers within thing1, your window's script should just
call like this:
tell my localThing to PublicRoutine()
It's really not a "neat" workaround, but it works. If you have many
application script objects that the window's script needs to know about, you
might try creating a record or a list of script objects in the application's
script, and then just pass the entire record or list to the window's init
handler; that way you wouldn't need to modify the parameter list of the init
handler when you add or remove scripts since all the scripts would be passed
in just one parameter.
Let me know if you have any problems getting this to work.
-Paul
=========================================================================
Date: Mon, 16 May 1994 16:30:24 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Ray <daver@NETCOM.COM>
Subject: Re: AppleScript & MIDI
>Does anyone know if AppleScript will interact with either the Apple MIDI
>Manager or the Opcode MIDI System (OMS)? Specifically, is there a way to
>get AS to recognize MIDI data?
>
>For example, can I have MIDI 'note on' (or program change, or whatever)
>signal sent from a remote computer and interpreted by AppleScript to
>trigger a macro or have another application open a file?
I use MIDI and Applescript a lot, but never together simultaneously.
The main problem is that, even if you *could* get applescript to sense
a MIDI event, the random delays that Applescript intoduces would make
it impossible to send events with the timing accuracy needed for
performance purposes. If timing accuracy is not a concern, then ther
>The problem arises because ethernet and appletalk conflict with MIDI and
>thus there is no way to have a network running at the same time as any
>software that requires MIDI.
Not true. I have the printer port running Appletalk, and the modem port
sending/receiving MIDI. Runs fine unless there is a lot of traffic
on both ports simultaeously. I'm using OMS.
I had a similar need for controlling Apple Events from MIDI, and here's
what I did.
CPU #1 CPU #2
___________________________ ___________________________
| | | |
| Running Max 2.2 | | Running Hypercard 2.1 |
| | | |
| | | |
| | | |
| modem printer | | modem printer |
___________________________ ___________________________
| o o | | o o |
___________________________ ___________________________
midi rs232 rs232 Appletalk
| | | |
| | | |
| ----------------------------- |
------- -------
| | | |
| | | |
------- -------
midi Appletalk
interface device
(Common Sense CNE)
The MAX software will run concurrently with Appletalk, but there is no
mechanism for them to communicate. MAX does have an RS-232 in/out provision
that can be triggered with MIDI and doesn't bog down timing accuracy of
MIDI playback. So I use the RS232 provision instead of Appletalk, and send
the signal to another CPU. This preserves timing accuracy on the system that
is outputting the music.
When a MIDI message comes in that I want to trigger something,
I send a signal out the RS-232 port into another computer running Hypercard.
There are XCMD and XCFN's that can check the characters coming in the
serial port. From there, some nested if..then statements in Hyperscript
allow me to trigger events based on which characters are sent over the
serial port. Other XCFN's are used to send Apple Events to my
Appletalk device.
I was able to send Apple events using XCMD's, without the use of Applescript.
If you want to trigger the opening of documents as you described, this
can be done in Hypercard without the use of Applescript. I don't know of
any mechanism to interface serial data with Applescript directly, except for
the TCP/IP scripting addition, which is only useful for SLIP/PPP type
of serial data.
What I'm looking for is a solution to doing all this with one CPU instead of
two. Something like:
________________________________________
| |
| Max 2.2 Hypercard |
| | | |
| -------- ---------- |
| | | | | |
| | virtual virtual | |
| | port 1 port 2 | |
| | | | | |
| modem ------------- printer|
________________________________________
| o o |
________________________________________
midi Appletalk
| |
| |
| |
------- -------
| | | |
| | | |
------- -------
midi Appletalk
interface device
So far I've been unsuccesful at this. There is a package called Loopback, which
adds two "virtual" CTB ports where the output of one goes to the input of the
other. The problem is that both programs (MAX and Hypercard) must be convinced
to use the selectable CTB port. The Hypercard XCMD can do this, but MAX/OMS
cannot. If I can get someone at Opcode to write a special version of the
MAX serial object that uses the CTB, I would be in business.
I supose there aren't a lot of people doing what I've shown here! Hence
Opcode is not really motivated to write special code for me, so this is the
best solution I could come up with.
Cheers
Dave
------------------------------------------------------------------------------
David Ray Dream Designs Music Composition
daver@netcom.com PO Box 5631 Interactive Multimedia
510-527-9010 Berkeley CA 94705 Virtual Worlds
=========================================================================
Date: Mon, 16 May 1994 16:31:21 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Ray <daver@NETCOM.COM>
>hi all I have a few specific questions.
>
>first off is there a scriptable screen capture utility avaliable? id like
>to be able to specify where it captures by cordinates of the screen.
Nothing like that, but you could always invoke f-key #3 to capture the whole
screen. I think the f-key can be scripted with Jon's commands scripting
addition.
>the second question is how do i determine the path of an open file. I know
>i can get the path by opening the file with choose file, but id like to
>figure out a get path command for and open file so i can do a save as to a
>different folder location which depends on the path of the original file.
I don't think it's possible.
-Dave
------------------------------------------------------------------------------
David Ray Dream Designs Music Composition
daver@netcom.com PO Box 5631 Interactive Multimedia
510-527-9010 Berkeley CA 94705 Virtual Worlds
=========================================================================
Date: Mon, 16 May 1994 17:51:00 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
Subject: AppleScript: Re: Scripting open files
>>the second question is how do i determine the path of an open file. I know
>>i can get the path by opening the file with choose file, but id like to
>>figure out a get path command for and open file so i can do a save as to a
>>different folder location which depends on the path of the original file.
>
>I don't think it's possible.
Kyle responds: I'm not sure I fully catch the drift of what you're trying
to do, but I'm referencing active files in my current projects, then moving
them to different folders based on their file type. (basically, I'm
watching a Rendering, determining when it becomes a PICT, closing it, then
moving it from one folder to another.)
I don't want to bore you with code that may not be applicable, but if this
sounds similar to what you're doing, let me know, and I'll send you some
sample code from my project.
Kyle
=========================================================================
Date: Mon, 16 May 1994 17:56:19 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
Subject: AppleScript: Frontmost, application of the Devil...
Hi all, I've got an interesting (read: frustrating as hell) situation: I
have an enabler script that simply talks to a remote application. The
script is as basic as you can get:
on run
try
tell app "SomeAPP" of machine "Remote" of zone "Nomads"
doIt()
end tell
on error
--no files to process
end try
end run
This works fine if I run it as as an AS app, but the second I attach it to
a button in Frontmost, the doIt() expression causes a Bus Error! Yikes!
Of course, I've tried sending the command as a script object, but THAT, as
we all know, will cause the ever-popular "User access denied" message that
we've all grown to know and love so well. =)
Has anyone else had this problem with Frontmost? If so, what did you do
about it? (I've got a sample file into Rob at AS tech, but I'm sure it
will take him a few days to trace it.)
Kyle "Script Killer" Maxwell
=========================================================================
Date: Tue, 17 May 1994 11:22:48 +0903
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matt Craig <mnmac@GAMGEE.CC.FLINDERS.EDU.AU>
>first off is there a scriptable screen capture utility avaliable? id like
>to be able to specify where it captures by cordinates of the screen.
It's not scriptable (at least I don't think so), but Flash-It will allow
you to capture a mouse-drag definable area of the screen (+ or - the
cursor), and continue to re-capture that area at the press of a button.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Matt Craig
Flinders Medical Centre "By the time they had diminished from
South Australia 50 to 8, the other dwarves began
Phone 61-8-204-4946 to suspect "Hungry"" - The Far Side
Email mnmac@cc.flinders.edu.au
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=========================================================================
Date: Thu, 12 May 1994 09:20:56 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Edmondson <ccastme@PRISM.GATECH.EDU>
Subject: Re: Danny Goodman's book - a question
In-Reply-To: <199405120545.BAA13936@acme.gatech.edu> from "Wagner Luiz
Truppel" at May 12, 94 07:44:25 am
> I have just signed on and I already need some help. Could someone tell me
> the ISBN number of Danny Goodman's book on AppleScript?
The Complete AppleScript Handbook (this is the original w/ AS 1.0)
Danny Goodman
Random House Electronic Publishing
ISBN 0-679-79148-5
U.S. $35.00
CAN. $46.00
The "Upgrade" for the Handbook to AppleScript 1.1 is:
ISBN 0-679-75537-3
U.S. $4.75
(I don't know if they are shipping the Handbook with AS 1.1)
You can contact Random House at 800-733-3000.
--
Michael Edmondson -=- ccastme@acme.gatech.edu -=- Macintosh User Assistant
=========================================================================
Date: Tue, 17 May 1994 04:36:16 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Lavallee, Marc" <r27764@ER.UQAM.CA>
Subject: OSA and Hypercard 2.2
I would like to know how to use the new popup menu in the scripting editor
of Hypercard 2.2. I don't get it...
Maybe my question should be send to the Hypercard list, but:
how to execute a Quickeys sequence or an AppleScript script from a button?
Since Quickeys/AppleScript don't understand "on mouseUp", how other
scripting langages can be used within Hypercard and mixed with Hypertalk?
Marc Lavallee
r27764@er.uqam.ca
=========================================================================
Date: Tue, 17 May 1994 07:47:14 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Comments: <Parser> E: "From:"/"Sender:" field is missing.
From: Undetermined origin c/o Postmaster <POSTMASTER@DARTCMS1.BITNET>
Subject: Re: AppleScript & MIDI
In-Reply-To: Your message of "Mon, 16 May 1994 16:30:24 MDT."
<9405170432.AA24808=DARTCMS1.DARTMOUTH.EDU!owner-macscrpt@HEARN.nic.SURFnet.nl
@
charon.cwi.nl>
Date: Tue, 17 May 1994 13:45:01 +0200
From: Peter de Waal <Peter.de.Waal@cwi.nl>
David Ray writes:
> I use MIDI and Applescript a lot, but never together simultaneously.
> The main problem is that, even if you *could* get applescript to sense
> a MIDI event, the random delays that Applescript intoduces would make
> it impossible to send events with the timing accuracy needed for
> performance purposes. If timing accuracy is not a concern, then ther
Abrupt end of the sentence, just when things were getting interesting.
Just two remarks:
1. I thought that it's possible to let the MIDI manager do all the
timing. I surely would not like to program a sequencer in Applescript, but
in principle the timing accuracy can be taken care of by the MIDI
manager.
2. It would be great to have an OSAX or APPL that would allow you to
send and get data from the MIDI manager, in the sense that you could
tell it, for instance, to send a given list of bytes. Something like
the TCP/IP OSAX, but then for MIDI :-). Does something like this exist?
--- Peter de Waal, CWI, Amsterdam ---
=========================================================================
Date: Tue, 17 May 1994 10:03:52 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Herb Schilling <hschilling@LERC.NASA.GOV>
Subject: Re: Script handlers strangen
> Reply to: RE>Script handlers strangeness
>In response to Herb Schilling:
>
>> I am trying to call a handler of a script object I created at the
>> application level from a window script. The call to the handler in the
>> script object is fine but when I call another handler in the same script
>> object from the handler, Frontmost tells me that the <<script>> does not
>> know how to handle the message, PrivateRoutine. Somehow, I have a feeling
>> that the call to PrivateRoutine is being done in the context of the window
>> script so it never gets to the thing1 object but this is a guess and I
>> don't see why this should be so.
>
>Very frustrating bug and difficult to track down, isn't it? Here's a
>workaround that works for me. You can pass the script object to an "init"
>handler (or whatever you want to call it) in your window's script, and then
>have your window's init handler assign the parameter to a "local" property.
>For example, after calling CreateThing, send a message like this to your
>window:
>
> tell window "mywindow" to init given theScript:thing1
> Stuff deleted......
Paul,
Thanks for the idea. It works! I also came up with an idea that also
works. I don't know which is better. Anyone care to comment? I haven't done
much with my method yet so there could be problems.
Here is my revised code. I put --******* next to the modified or new stuff.
It has the benefit of not messing up the windows script but it messes up
the script object a bit. Basically, I store a reference to the script
object inside itself as a property. Then when I call a handler of the
script I explicitly use that reference with a tell phrase.
===========================
In application script
===========================
on run()
set thing1 to CreateThing()
end run
on CreateThing() -- "constructor" of thing
script thing
property yoursTruly : {} -- *******
on PrivateRoutine()
-- do something
end PrivateRoutine
on PublicRoutine()
tell yoursTruly to PrivateRoutine() -- *********
end PublicRoutine
end script
set theResult to result -- **********
set yoursTruly of theResult to theResult -- **********
end CreateThing
===========================
In window script
===========================
tell my thing1 to PublicRoutine()
--
Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
sshws@convx1.lerc.nasa.gov
AppleLink: SCHILLING.H
=========================================================================
Date: Tue, 17 May 1994 10:19:58 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Aimee Baird Pharr <aabuva@WAM.UMD.EDU>
Subject: Symantec C++ Peek Command
I am using AppleScript to automate some of the tedious operations
required to build complex Symantec C++ projects reliably.
Symantec provides some scripting examples and there are some scripts
on sumex, but I see very little use of the Peek or Poke commands
which allow access the data in their options blocks.
Does anyone have any sample AppleScript code which makes use
of the Peek command? I am having problems getting AppleScript to assign
a 16 bit integer in the data block to an AppleScript integer type.
I get random results and I have resorted to examining the structure on a
byte by byte basis - very awkward. Any help I could get would be greatly
appreciated.
Thanks,
Paul Pharr
=========================================================================
Date: Tue, 17 May 1994 15:42:33 GMT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Robert K. Terra" <Robert_Terra@BROWN.EDU>
Organization: Brown University
Subject: Copying Folders without Finder coming to the front
Hi all,
Is it possible to copy a folder without the finder coming to the front?
I'm writing a script that allows me to copy files/folders to many folders
on a fileserver. I'm using a "progress bar" to show which folder that I am
currently on and how many folders are left. It seems like in can be done
with files using Jon Pugh's "copyFile" but that (or I can't get it to work)
does'nt seem to work for folders. I can copy folders using "finderLib" but
that's where it seems to bring up the finder's "copying aleart" which ends
up putting the progress bar in the background. I would like for the
progress bar to remain "in front" throughout the script.
PS: Still using v1.0 and it seems like I have just about every scripting
addition known to mankind.
thx in advance for any help
Bob
=========================================================================
Date: Tue, 17 May 1994 09:09:48 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: OSA and Hypercard 2.2
Marc Lavallee writes...
>I would like to know how to use the new popup menu in the scripting editor
>of Hypercard 2.2. I don't get it...
>Maybe my question should be send to the Hypercard list, but:
>how to execute a Quickeys sequence or an AppleScript script from a button?
>Since Quickeys/AppleScript don't understand "on mouseUp", how other
>scripting langages can be used within Hypercard and mixed with Hypertalk?
The small detail that AppleScript doesn't understand the mouseup event
doesn't keep things from working. Here's a working button script from a
play stack of mine (no, it doesn't do anything useful...it does work,
simulating a click on another button):
on mouseUp
beep
tell application "HyperCard" to click at loc of button "Test"
end mouseUp
[As it happens, the button script for button "Test" is written in UserTalk.]
Jon Pugh will explain how it works in detail, I suspect. But...OSA has
some events which make this sort of thing quite easy. It's a nice
design...you can include it in programs of your own without great
difficulty.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Tue, 17 May 1994 11:49:41 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Frank Concannon <frank.concannon@DISPATCHER.UOKHSC.EDU>
Subject: Invisible Scripts !!
Invisible Scripts !!
Howdy
OK. Here is a question that may be off the wall.
I have a classroom of Quad 700s for which I an developing some
control/monitoring scripts. At this stage the strategy is to save the
control/monitoring script as an application store it on an AppleShare server
and put an alias to it in the Startup Items folder on individual macs. All
this has been tested and found to be a workable solution.
However, elegant it ain't.
Now that everything is starting to work to my satisfaction I need a way to
prevent users from quitting the script application on the classroom Macs
either deliberately or accidently.
Is there an alternative way to run a script such that it presents no
interface to the user (ie. No Menubar!.) I have in mind "Script Daemon" from
Peter N Lewis. which performs a similar task.
Can something like this be implemented by mortals ( read...I am not a C
programmer. )
Frank C.
R&E
=========================================================================
Date: Tue, 17 May 1994 12:59:49 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Lavallee, Marc" <r27764@ER.UQAM.CA>
Subject: Re: OSA and Hypercard 2.2
On Tue, 17 May 1994, John W. Baxter wrote:
> on mouseUp
> beep
> tell application "HyperCard" to click at loc of button "Test"
> end mouseUp
>
>
> [As it happens, the button script for button "Test" is written in UserTalk.]
Recursivity? If the button script is a Quickeys sequence, will it work?
Instead of telling a button, in Applescript, to click a button that
contains another "non-Hypertalk" script, I only want to execute a Quickeys
sequence... I understand now that only the concept of OSA has been
implemented in Hypercard, and that it is not very useful now because the
foreign scripting langage must understand Hypercard messages (this not
the case of Quickeys). :-(
=========================================================================
Date: Tue, 17 May 1994 12:09:27 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
Subject: AppleScript: Eudora Scripting
Hi all!
Here's a simple little script I wrote for sorting files in Eudora.
Basically, all it does is sort AppleScript related mail into an
"AppleScript List" folder. (or any files you want into any folder you want,
of course.)
---------------------- cut here---------------------------
property default : ""
property inBox : "In"
property asBox : "AppleScript list"
on run
tell application "Eudora1.4.2"
activate
set messageCount to count message of mailbox inBox of mail
folder ""
repeat with i from 1 to messageCount
set holder to Subject of message i of mailbox inBox
of mail folder default
if holder contains ("AppleScript" as string) then
move message i of mailbox inBox of mail
folder default =AC
InsertHere end of mailbox asBox of
mail folder default
end if
end repeat
end tell
end run
---------------------- cut here---------------------------
Obviously, since it only searches the Subject field, you have to rely on
the courtesy of others to include the List name in their subject
descriptions. Still, since it's just basic Nettiquete to do so, it usually
works. (Or, you could change line 6 search the Message field, if you
happen to have all day for the search to complete.) <grin>
Kyle
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-I'd feel worse if I weren't under such heavy sedation...
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
=========================================================================
Date: Tue, 17 May 1994 11:35:13 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: John R Mudd <jrm@PGROUP.COM>
Subject: Applescript/FileMaker Pro problem and questions
Here's an interesting problem that I've run into, and hopefully
someone will have some good advice on how to resolve it. Note
that I am relatively new to Applescript.
I have a server that runs System 7 Pro and FM Pro 2.1. FMP files
can be opened across the network on various user Macs. At night,
the FMP files need to be closed first before the backup runs. I
can't ensure that my users will close the files themselves--the
script has to make sure that FMP is down before firing up the
backup program (Retrospect).
I've been unable to create an applescript that will handle the
above scenario. Ideally,
'tell application "FileMaker Pro" to close every window saving yes'
in the Scriptable Text Editor would do the trick, but FMP doesn't
seem to acknowledge the 'saving yes' part. Simply closing every
window doesn't work, because invariably someone has left a file
open, and the 'close' will then return with a FMP dialog box
saying so-and-so is still using the file.
Solutions? If FMP truly doesn't support the "saving yes" option,
does the dialog box generate an event that I can capture in my
script and force the 'saving yes' that way?
---
John R. Mudd jrm@pgroup.com
The Portland Group, Inc. Voice: (503) 682-2806
9150 SW Pioneer Court, Suite J FAX: (503) 682-2637
Wilsonville, Oregon 97070
=========================================================================
Date: Tue, 17 May 1994 13:05:46 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
Subject: Re: Applescript/FileMaker Pro problem and questions
>'tell application "FileMaker Pro" to close every window saving yes'
>
>in the Scriptable Text Editor would do the trick, but FMP doesn't
>seem to acknowledge the 'saving yes' part. Simply closing every
>window doesn't work, because invariably someone has left a file
>open, and the 'close' will then return with a FMP dialog box
>saying so-and-so is still using the file.
>
>Solutions? If FMP truly doesn't support the "saving yes" option,
>does the dialog box generate an event that I can capture in my
>script and force the 'saving yes' that way?
I've attempted this very thing, or something similar to it; your problem
lies in the fact that FMP doesn't support save yes/no. (Claris
thoughtfully forged new ground in user interface, and auto-saves all files.
This goes in the "Isn't it nice that AppleLink doesn't support
AppleScript" file of unsolvable mysteries... <grin>)
You could force the whole program to quit, which is what I did. (I used
the Choose Application command, queued up all known running copies of FMP,
then Quit them.) This method tends to miff people a bit, (Who shut down my
Inventory list!?!) but it's the only work around I've been able to come up
with... Looking forward to what others have to say about this...
Kyle
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-I'd feel worse if I weren't under such heavy sedation...
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
=========================================================================
Date: Tue, 17 May 1994 14:03:07 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Paul Farrah <paul_farrah1@QM.CLARIS.COM>
Subject: Re: Applescript/FileMaker P
Reply to: RE>>Applescript/FileMaker Pr
Re: Problem about telling FileMaker Pro to close every window
True, FileMaker Pro doesn't support the concept of "saving" because it
automatically saves during idle time and whenever else it is necessary.
If your main concern is to get the backup done, I've successfully backed up
FileMaker Pro files (copied them in the Finder) without first closing them.
Upon reopening the backed-up files, FileMaker Pro will do a "consistency
check" (basically verifies that the file indeed was closed OK). I couldn't
gaurantee that this method won't cause problems, but I've done it dozens of
times without any problems myself. Note that this is possible only when the
Finder of the host machine performs the copy (i.e., you can't do it from a
machine that has the host mounted as an AppleShare volume--your Finder will
say that the file is busy).
FileMaker Pro Server (soon to be released) will have the capability to be
administered remotely. You would be able to selectively send disconnect
messages to individual guests of individual databases. If the files remain
open on the guest machines after several notification attempts, the
administrator will have the option to force any or all guests to be
disconnected, or to resend the disconnect notification (or to cancel the
disconnect notification). Although forcing users to disconnect in this manner
introduces the possibility of data loss (changes to any records actively
being edited on guest machines, and possible data loss of databases being
hosted by the guests), there really is nothing the host application could do
to prevent this since you are, in effect, telling FileMaker Pro, "I don't
care, just close it!".
Hope this helps.
-Paul
<discussion below>
---------------------------------------------------------
>'tell application "FileMaker Pro" to close every window saving yes'
>
>in the Scriptable Text Editor would do the trick, but FMP doesn't
>seem to acknowledge the 'saving yes' part. Simply closing every
>window doesn't work, because invariably someone has left a file
>open, and the 'close' will then return with a FMP dialog box
>saying so-and-so is still using the file.
>
>Solutions? If FMP truly doesn't support the "saving yes" option,
>does the dialog box generate an event that I can capture in my
>script and force the 'saving yes' that way?
I've attempted this very thing, or something similar to it; your problem
lies in the fact that FMP doesn't support save yes/no. (Claris
thoughtfully forged new ground in user interface, and auto-saves all files.
This goes in the "Isn't it nice that AppleLink doesn't support
AppleScript" file of unsolvable mysteries... <grin>)
You could force the whole program to quit, which is what I did. (I used
the Choose Application command, queued up all known running copies of FMP,
then Quit them.) This method tends to miff people a bit, (Who shut down my
Inventory list!?!) but it's the only work around I've been able to come up
with... Looking forward to what others have to say about this...
Kyle
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-I'd feel worse if I weren't under such heavy sedation...
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
=========================================================================
Date: Tue, 17 May 1994 18:51:21 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: Eudora Sample Scripts?
Can someone point me to the location of the Eudora sample scripts?
Can someone point me to the server for the latest Eudora that all you
Eudora Scripters are using? Are people using 1.4.2 or the 2.x version for
these AppleScripts?
I've been using PowerTalk and the Beyond PowerRules and well ... I'd like
to experiment with another option.
Thanks,
Kee Nethery
_________________________________________________________________
Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
=========================================================================
Date: Tue, 17 May 1994 20:45:41 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: OSA and Hypercard 2.2
>On Tue, 17 May 1994, John W. Baxter wrote:
>
>> on mouseUp
>> beep
>> tell application "HyperCard" to click at loc of button "Test"
>> end mouseUp
>>
>>
>> [As it happens, the button script for button "Test" is written in UserTalk.]
>
>Recursivity? If the button script is a Quickeys sequence, will it work?
>Instead of telling a button, in Applescript, to click a button that
>contains another "non-Hypertalk" script, I only want to execute a Quickeys
>sequence... I understand now that only the concept of OSA has been
>implemented in Hypercard, and that it is not very useful now because the
>foreign scripting langage must understand Hypercard messages (this not
>the case of Quickeys). :-(
The non-Hypercard scripting system does NOT have to understand HyperCard
messages. It need only know how to send certain defined events having to
do with "hey, you...handle this subroutine". Nothing in AppleScript
understands "mouseUp" except in the context of Hypercard <or some other
host which works similarly>.
There are indeed other ways than my code snippet above to get the same job
done...that's just how I happened to do it in December when I was playing
around.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Wed, 18 May 1994 15:52:13 +1200
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Norris <michael.norris@STONEBOW.OTAGO.AC.NZ>
Subject: Re: OSA and Hypercard 2.2
This is all very well and good, but how do I transfer an appleScript
varaible to a HyperTalk variable?
I can go from HC to AS by
set ASVar to evaluate "HCVar"
but how do I go in reverse?
Cheers,
Michael Norris,
CAL Consultant,
University of Otago,
PO Box 56,
Dunedin,
New Zealand.
---------------------
Ph:(03) 479-7705
E-Mail: michael.norris@stonebow.otago.ac.nz
=========================================================================
Date: Wed, 18 May 1994 08:24:56 +0200
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Marco Strehler <strehler@FVMED.UNIZH.CH>
Subject: Re: Invisible Scripts !!
>Now that everything is starting to work to my satisfaction I need a way to
>prevent users from quitting the script application on the classroom Macs
>either deliberately or accidently.
>Is there an alternative way to run a script such that it presents no
>interface to the user (ie. No Menubar!.) I have in mind "Script Daemon" from
>Peter N Lewis. which performs a similar task.
>Can something like this be implemented by mortals ( read...I am not a C
>programmer. )
>
>Frank C.
>
>R&E
Hi Frank!
This script application is visible but does not end to beep every 5 seconds.
The menu command "Quit" (or command-Q) won't have any effect.
For quitting you must use an <<unlock>> script (see below) or command-alt-esc.
Hope this helps!
- Marco
---------------------------------------------------------------------
-- The <<Never Quit>> Script:
-- This script application (save as "stay open") never stops!
---------------------------------------------------------------------
property QuitSwitch : false
on run
set QuitSwitch to false
end run
on idle
beep
return 5
end idle
on QuitSwitcher()
set QuitSwitch to true
quit
end QuitSwitcher
on quit
if QuitSwitch then continue quit
end quit
---------------------------------------------------------------------
-- The <<Unlock>> Script:
-- Run THIS script to stop the annoying beeping!
---------------------------------------------------------------------
tell application "Never Quit"
QuitSwitcher()
end tell
----------------------------------------------------------------
Marco Strehler, Im Dreispitz 21, 8152 Glattbrugg (Switzerland)
VOICE: ++41 (0)1 810 27 03 INTERNET: strehler@fvmed.unizh.ch
----------------------------------------------------------------
=========================================================================
Date: Wed, 18 May 1994 08:49:47 CDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tom Donovan <donovan@COVIS.NWU.EDU>
Subject: Re: OSA and Hypercard 2.2
>This is all very well and good, but how do I transfer an appleScript
>varaible to a HyperTalk variable?
>
>I can go from HC to AS by
>set ASVar to evaluate "HCVar"
>
>but how do I go in reverse?
>
>Cheers,
>
Michael,
Try this:
set variable "HCVar" to ASVar
--Tom
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Tom Donovan "The city is a place where a small boy, as he walks
Support Specialist through it, may see something that will tell him what
CoVis Project he wants to do his whole life."
Northwestern Univ.
--Louis I. Kahn
E-mail: donovan@covis.nwu.edu
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=========================================================================
Date: Wed, 18 May 1994 10:12:44 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Edmondson <ccastme@PRISM.GATECH.EDU>
Subject: [?] Erase Disk in Finder
I work as a User Assistant at Georgia Tech, and a weekly routine is to
completely erase the hard drives of everything and then reinstall the
system software off of the local server. (A scripting nightmare, and I'm
just a beginner too!) I've looked all over and have never found an 'Erase
Disk' scripting addition. I've considered using Menu Events, but wonder if
perhaps someone else had another suggestion.
The whole refresh procedure consists of zapping the PRAM, booting off a
floppy (which doesn't have much space to begin with), erasing the hard
drive after making sure it has the right name, mounting the server and then
copying the neccessary folders onto the hard drive, then rebooting and
setting all the control panels. Although when looking at the entire
process, I think just the first part (before rebooting) would suffice...for
now.
Hey, it's a great way for a beginner to learn how to script..
Start an enormous task before learning the basics ;)
Michael Edmondson -=- ccastme@acme.gatech.edu -=- Macintosh User
Assistant
=========================================================================
Date: Wed, 18 May 1994 10:59:07 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Lee K. Hoong" <lhoong@EMORYU1.CC.EMORY.EDU>
Subject: OSA Menu and Frontmost
I've been trying to use Leonard Rosenthol's OSA menu (1.01) with a
Frontmost mini-app (frontlet), but I keep getting an error of -1753. Does
OSA menu work only with scripts/applets created by the Script Editor? Any
insights will be appreciated. Thanks in advance.
Lee.
Lee K. Hoong
Dept. of Chemistry, Emory University
Internet: lhoong@unix.cc.emory.edu | America On-line: LHOONG
Disclaimer: I speak for myself only, not for Emory University
=========================================================================
Date: Wed, 18 May 1994 08:54:45 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
Subject: AppleScript Re: Eudora Sample Scripts?
Re the message below:
Kee, use anon FTP for the following location:
ftp.qualcomm.com
It has sample scripts, as well as the latest version of Eudora. Plus, I've
done a lot of work scripting Eudora; I'd be happy to send you what I've
done.
Kyle Maxwell
maxwell@cc.dixie.edu
-------------------------------------------
>Can someone point me to the location of the Eudora sample scripts?
>
>Can someone point me to the server for the latest Eudora that all you
>Eudora Scripters are using? Are people using 1.4.2 or the 2.x version for
>these AppleScripts?
>
>I've been using PowerTalk and the Beyond PowerRules and well ... I'd like
>to experiment with another option.
>
>Thanks,
>Kee Nethery
>
>_________________________________________________________________
>Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-I'd feel worse if I weren't under such heavy sedation...
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
=========================================================================
Date: Wed, 18 May 1994 11:28:43 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: [?] Erase Disk in Finder
In-Reply-To: <no.id> from "Michael Edmondson" at May 18, 94 10:12:44 am
--Michael Edmondson wrote:
>
>I work as a User Assistant at Georgia Tech, and a weekly routine is to
>completely erase the hard drives of everything and then reinstall the
>system software off of the local server. (A scripting nightmare, and I'm
>just a beginner too!)
You're kidding, right? You do this every week!? How many Macs do you
have to do this for?
>I've looked all over and have never found an 'Erase Disk' scripting
>addition. I've considered using Menu Events, but wonder if perhaps
>someone else had another suggestion.
I don't think there is an Erase Disk osax, however, what you really
need is a copy of the Scriptable Finder. You can get this by purchasing
a recent copy of the AppleScript scripter's Kit ($140 from
MacConnection), or puchasing the AppleScript Software Developer's Kit
($199 from APDA).
>The whole refresh procedure consists of zapping the PRAM, booting off a
>floppy (which doesn't have much space to begin with), erasing the hard
>drive after making sure it has the right name, mounting the server and then
>copying the neccessary folders onto the hard drive, then rebooting and
>setting all the control panels.
Well, I don't really want to tell you how to do your job (ok, so I
do want to, but that's beside the point ;), but you have an awful lot of
over kill going on here. First of all, you almost never need to zap the
PRAM on a Mac. You definitely don't need to do this on a weekly basis.
Secondly, erasing the Apple control panels and extensions really isn't
doing a whole lot. All they really do is provide an interface to the
resources in the System file. A better solution would be to trash the
System and the Finder every week, and copy fresh copies to the hard
drives. You might also want to trash the Finder Preferences file from
the Preferences folder. Instead of erasing the HD you might want to look
into removing any files that don't belong, and then optimozing the HD
with something like Speed Disk or CP Optimizer.
The suggestions above are most likely more efficient than what you
are currently doing, put less wear and tear on the HDs, and definitely
takes less time. I would seriously investigate these and possibly some
other options to keeping your lab computers clean.
>Although when looking at the entire process, I think just the first part
>(before rebooting) would suffice...for now.
Oh, yeah, btw the Scriptable Finder is pretty good a doing much of
what you seem to want to do. I think it's definitely the way for you to
go if you want to control the clean-up process with AppleScript. You can
also use UserLand Frontier to do this kind of Finder manipulation.
-Hades
p.s. Apologies to all of you who feel that this should have been posted
to another list...
=========================================================================
Date: Wed, 18 May 1994 08:47:28 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: OSA Menu and Frontmost
At 10:59 5/18/94 -0400, Lee K. Hoong wrote:
>I've been trying to use Leonard Rosenthol's OSA menu (1.01) with a
>Frontmost mini-app (frontlet), but I keep getting an error of -1753. Does
>OSA menu work only with scripts/applets created by the Script Editor? Any
>insights will be appreciated. Thanks in advance.
OSA menu doesn't work "only" with scripts created by the Script Editor. It
works well with scripts exported as OSA scripts from Frontier, for
instance. [And it works with either of those in any available OSA
language.]
But...it does rely on certain things about the way the files are organized.
Considering that my attempt just now to use ResEdit to look at how the
Frontmost sample "StapleDocs.mini" produced a nasty warning about the file
being damaged, I'm dubious about whether Frontmost applets are organized as
OSA Menu expects.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Wed, 18 May 1994 09:10:31 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: Re: [?] Erase Disk in Finder
>--Michael Edmondson wrote:
>>
>>I work as a User Assistant at Georgia Tech, and a weekly routine is to
>>completely erase the hard drives of everything and then reinstall the
>>system software off of the local server. (A scripting nightmare, and I'm
>>just a beginner too!)
>
> You're kidding, right? You do this every week!? How many Macs do you
>have to do this for?
>
I know this might be bad form but ... Apple makes software that does
exactly what you describe you need. I forget what it is called, maybe
"alike" or some such name. No AppleScript involved but probably easier to
use. You boot from a floppy on each machine and a fresh version of the hard
drive is replicated onto the machines hard drive.
Kee Nethery
_________________________________________________________________
Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
=========================================================================
Date: Wed, 18 May 1994 09:21:51 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Lewis <lewis@NETCOM.COM>
Subject: Frontier and RAM disks/floppies
I'm having trouble getting Frontier's file.getSpecialFolderPath routine and
the setStartup extension to work. I can't get setStartup to select a RAM
disk, although I can select any of my hard drives. The control panel
afterwards will show no drive highlighted (although I can then select the
RAM disk with no problem). In the case of file.getSpecialFolderPath, the
"create" boolean doesn't seem to work. Executing
file.getSpecialFolderPath ("RAM Disk:", "System Folder", true)
will give the error 'The file "System Folder" wasn't found.' This is also
true with a hard drive if it doesn't already have a system folder. If the
folder is already there, the path is returned correctly.
I'm running Frontier 3.0.3 on a Duo 230 with System 7.1, System Update 3.0,
AppleEvent Manager 1.0.3, and Thread Manager 2.0.1, if any of that makes a
difference. Thanks in advance (, John :-) ).
David
David Lewis Seagate Technology (408) 439-2374 lewis@netcom.com
=========================================================================
Date: Wed, 18 May 1994 09:46:27 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Frontier and RAM disks/floppies
At 09:21 5/18/94 -0800, David Lewis wrote:
>I'm having trouble getting Frontier's file.getSpecialFolderPath routine and
>the setStartup extension to work. I can't get setStartup to select a RAM
>disk, although I can select any of my hard drives. The control panel
>afterwards will show no drive highlighted (although I can then select the
>RAM disk with no problem). In the case of file.getSpecialFolderPath, the
>"create" boolean doesn't seem to work. Executing
> file.getSpecialFolderPath ("RAM Disk:", "System Folder", true)
>will give the error 'The file "System Folder" wasn't found.' This is also
>true with a hard drive if it doesn't already have a system folder. If the
>folder is already there, the path is returned correctly.
>I'm running Frontier 3.0.3 on a Duo 230 with System 7.1, System Update 3.0,
>AppleEvent Manager 1.0.3, and Thread Manager 2.0.1, if any of that makes a
>difference. Thanks in advance (, John :-) ).
Hi, David...
file.getSpecialFolderPath () uses the FindFolder () toolbox trap. One
thing that the trap will not do is create a System Folder. This is spelled
out in Inside Macintosh. [Given that a System Folder exists, it will
create subfolders within it.] That seems like a reasonable restriction,
since a folder named "System Folder" isn't sufficient...it needs to contain
a System file and a Finder file (and a few other odds and ends).
The DocServer description for file.getSpecialFolderPath () does mention
this restriction (under Notes):
>* If the folder parameter is not valid, or the requested folder could not be
> found or created, an error is generated.
>* If the desired folder belongs in the System Folder and the volume does not
> contain a System Folder, no System Folder will be created, and an error will
> occur.
I can't say anything about the setStartup extension, since I don't think I
have it. --John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Wed, 18 May 1994 10:00:20 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Doug Baron <userland@NETCOM.COM>
Subject: Re: Frontier and RAM disks/floppies
In-Reply-To: <199405181627.JAA15420@netcom.com> from "David Lewis" at May 18,
94 09:21:51 am
>
> I'm having trouble getting Frontier's file.getSpecialFolderPath routine and
> the setStartup extension to work. I can't get setStartup to select a RAM
> disk, although I can select any of my hard drives. The control panel
> afterwards will show no drive highlighted (although I can then select the
> RAM disk with no problem).
Since Frontier doesn't know anything about what the setStartup extension
is doing, this sounds like a problem with setStartup -- or with the RAM
disk software.
> In the case of file.getSpecialFolderPath, the "create" boolean doesn't
> seem to work. Executing
> file.getSpecialFolderPath ("RAM Disk:", "System Folder", true)
> will give the error 'The file "System Folder" wasn't found.' This is also
> true with a hard drive if it doesn't already have a system folder. If the
> folder is already there, the path is returned correctly.
> I'm running Frontier 3.0.3 on a Duo 230 with System 7.1, System Update 3.0,
> AppleEvent Manager 1.0.3, and Thread Manager 2.0.1, if any of that makes a
> difference. Thanks in advance (, John :-) ).
>
> David
>
> David Lewis Seagate Technology (408) 439-2374 lewis@netcom.com
>
The file.getSystemFolderPath verb maps directly to the OS's FindFolder
function. Although the "create if necessary" flag is set, this function
can't be use to create a System Folder; it wouldn't be a valid one. In
the case of the System's subfolders, simply creating an empty folder does
the job; the System Folder itself requires an installer.
If you really want to create an empty System Folder if it's not there,
use the file.sureFolder verb.
Doug
=========================================================================
Date: Wed, 18 May 1994 10:07:30 -0900
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Dan Callaway <dan@LANMINDS.COM>
Subject: Re: [?] Erase Disk in Finder
> I work as a User Assistant at Georgia Tech, and a weekly routine is to
> completely erase the hard drives of everything and then reinstall the
> system software off of the local server.
You might want to give Frontier a try. Frontier ships with a "Network" that
will
do
close to what you want.
(here is a section of the read me file that comes with it...)
Imagine youUre the network manager for a classroom full of Macintoshes. Every
day, dozens of students come into the lab to do their assignments and projects.
In the course of a day, new files get created, essential files are accidentally
deleted. So once a day, you shut the system down and visit all the computers
and
replace missing files and delete extraneous ones, by manually pointing,
clicking
and dragging.
NightWatch -- the first UserLand network utility, does this for you
automatically
and very carefully. It produces a detailed report of all the updating and
cleaning up it did. And because NightWatch is implemented using Frontier
scripts, you can customize NightWatch to exactly suit your needs.
HereUs how you install NightWatch. From the NetUtils menu, select each command
in the RConfigure NightWatchS sub-menu. First youUll set your "original"
folder,
the one that contains the master clean copy of all the files and folders you
want replicated on all the clone machines. Set the original folder by using the
RSet Original FolderIS command.
ThereUs a table full of paths to folders on the clone machines called clone
folders. These folders must be accessible on your FinderUs desktop when
NightWatch runs. You can add paths to your list of clone folders using the RAdd
Clone FolderS command.
If you want to delete clones from your table, select the ROpen Clone TableS
command, and use the normal Macintosh Cut command to delete any paths you want
to remove from the table.
.... etc..... Good Luck!
***************************
* -- Dan Callaway -- *
* -- dan@lanminds.com -- *
* -- Berkeley, CA -- *
***************************
=========================================================================
Date: Wed, 18 May 1994 13:12:14 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jim <nauta@NCREL.ORG>
Subject: Re: [?] Erase Disk in Finder
>>--Michael Edmondson wrote:
>>>
>>>I work as a User Assistant at Georgia Tech, and a weekly routine is to
>>>completely erase the hard drives of everything and then reinstall the
>>>system software off of the local server. (A scripting nightmare, and I'm
>>>just a beginner too!)
>>
>> You're kidding, right? You do this every week!? How many Macs do you
>>have to do this for?
>>
>
>I know this might be bad form but ... Apple makes software that does
>exactly what you describe you need. I forget what it is called, maybe
>"alike" or some such name. No AppleScript involved but probably easier to
>use. You boot from a floppy on each machine and a fresh version of the hard
>drive is replicated onto the machines hard drive.
>
>Kee Nethery
>
>_________________________________________________________________
>Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
---------------------------
The product is called "LIKEWISE" and it would really make this job easy.
Last I heard, it wasn't reliable over ethernet, but that was a while ago.
You just set up a folder on the server with all the software for each
station, including system and finder, and it updates the whole lab.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Jim Nauta phone: 708/218-1275
North Central Regional Educational Laboratory fax: 708/571-4716
1900 Spring Road, Suite 300 internet: nauta@ncrel.org
Oak Brook, IL 60521 Applelink: NCREL
AOL: NAUTA
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=========================================================================
Date: Wed, 18 May 1994 10:44:58 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: OSA and Hypercard 2.2
At 15:52 5/18/94 +1200, Michael Norris wrote:
>This is all very well and good, but how do I transfer an appleScript
>varaible to a HyperTalk variable?
>
>I can go from HC to AS by
>set ASVar to evaluate "HCVar"
One of the kinds of elements of the HyperCard application (as viewed from
AppleScript) is "variable".
Here's a button script in AppleScript (copied from my experimental stack):
on mouseUp
set variable "foo" to "I am it"
end mouseUp
Once that has been executed, this HyperTalk script in another button does
indeed show the message box containing "I am it":
on mouseUp
global foo
put foo
end mouseUp
-------------
One thing to note: in a previous post, I had a tell application
"HyperCard" wrapped around messages directed to HyperCard. This isn't
necessary (or harmful) in an AppleScript executing within HyperCard. Just
as the Script Editor is being told things outside all tells, when you are
working in Script Editor, HyperCard is the tellee outside of tells when you
are executing in HyperCard.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Wed, 18 May 1994 12:02:31 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: OSA and Hypercard 2.2
>Since Quickeys/AppleScript don't understand "on mouseUp", how other
>scripting langages can be used within Hypercard and mixed with Hypertalk?
This isn't quite true. AppleScript completely understands all the
Hypercard messages when running in Hypercard objects. If you open the
Hypercard dictionary in the Script Editor, you will see a section with all
these messages.
Try this AppleScript in a button:
on mouseUp
display dialog "Foo!"
end mouseUp
on mouseEnter
beep
end mouseEnter
Both of these messages are clearly understood. Hypercard essentially wraps
every AppleScript with a "tell app Hypercard" block.
Unfortunately, QuicKeys doesn't cope as well. QuicKeys only understands an
implicit run message and Hypercard doesn't send those directly from the UI.
Instead, you need a redirection like so:
AppleScript Button "Foo":
on mouseUp
tell button "Bar" to run
end mouseUp
QuicKeys Button "Bar":
Click (4, 20 Screen) - (0, 0 Mouse)
Wait Application "Finder"
Menu "About This Macintosh=8A" Apple_Menu
Wait Window Name_Is "About This Macintosh"
Mousie Close_Window
This is how you can run QuicKeys scripts from within Hypercard. Another
choice is to use my "run script resource" osax which allows you to place
named resources into your stack (or script application) and run them. This
gets them out of the way and hides them from nosy people. You can also
save scripts "run only" and run them this way thus protecting your scripts
from prying eyes, even in Hypercard (which does not support run only
scripts otherwise).
An implication of this stuff is that you cannot make a stack with a mess of
QuicKeys scripts in its stack script as a library. You must make a card
(or cards) full of buttons and some sort of redirection script in the stack
script. With AppleScript, you just make a stack with the stack script full
of helpful AppleScript handlers and start using it. Then your handlers are
all seemlessly integrated into your Hypercard scripting environment.
>I understand now that only the concept of OSA has been
>implemented in Hypercard, and that it is not very useful now because the
>foreign scripting langage must understand Hypercard messages (this not
>the case of Quickeys). :-(
Au contraire, OSA is extremely useful because AppleScript does understand
Hypercard's messages and can communicate with other Hypercard parts to
cover the limitations that other OSA languages have.
>This is all very well and good, but how do I transfer an appleScript
>varaible to a HyperTalk variable?
>
>I can go from HC to AS by
>set ASVar to evaluate "HCVar"
>
>but how do I go in reverse?
The simplest way is to provide a routine to return it. You can also access
properties of scripts. Given three buttons:
AppleScript Button "Foo":
property foobar : "Yoich!"
on getFoobar()
return foobar
end getFoobar
AppleScript Button "Bar":
on mouseUp
set x to script of button "Foo" as script -- text is the default
answer x's foobar
end mouseUp
HyperTalk button "Fubar":
on mouseUp
send getfoobar to button "foo"
answer the result
end mouseUp
Pressing button "Bar" or "Fubar" will result in "Yoich!" being displayed.
>Jon Pugh will explain how it works in detail, I suspect.
Your confidence is inspiring. ;)
Jon
=========================================================================
Date: Wed, 18 May 1994 12:02:35 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: Copying Folders without Finder coming to the front
>It seems like in can be done
>with files using Jon Pugh's "copyFile" but that (or I can't get it to work)
>does'nt seem to work for folders.
Correct. It doesn't work with folders. I'm going to fix this, but I'm up
to my neck in work and it will be a while before I get around to it.
Jon
=========================================================================
Date: Wed, 18 May 1994 15:03:21 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Edmondson <ccastme@PRISM.GATECH.EDU>
Subject: Re: [?] Erase Disk in Finder
In-Reply-To: <199405181550.LAA07421@acme.gatech.edu> from "Brian V. Hughes" at
May 18, 94 11:28:43 am
First of all, thanks for all the input, suggestions and opinions.
> You're kidding, right? You do this every week!? How many Macs do you
> have to do this for?
Unfortunately, no, I'm not kidding. (Hey, they're not MY rules!)
We have six Mac labs (not total, of course; these are the public ones),
each lab has around 40 Macs. And of course, the reason we initialize
instead of simply erasing the unneccessary files is because -- it's
simplier that way! Sure we could use all sorts of optimizers and such
utilities, but initialization is FREE! OIT is very cheap, which brings
up another issue -- how much is it going to cost to automate this?
Frontier: sounds like it does all I need, but I'm a beginner to
AppleScript and haven't even *glanced* at Frontier scripts...
Pump'n snatch: Looking into it, but if it's shareware, it probably
won't be used.
Likewise: If it's from Apple, it would be seriously considered, but..
SCRIPTABLE FINDER! This is what would be great; however, it wouldn't
be put on any of the machines until it was mandatory (Sys 7.5), and
even then the Macs wouldn't be upgraded until it was really REALLY
deemed neccessary. *sigh*
> First of all, you almost never need to zap the
> PRAM on a Mac. You definitely don't need to do this on a weekly basis.
> Secondly, erasing the Apple control panels and extensions really isn't
> doing a whole lot. All they really do is provide an interface to the
> resources in the System file. A better solution would be to trash the
> System and the Finder every week, and copy fresh copies to the hard
Imagine you have a Mac lab that's open 24 hours a day... (we got two)
The other labs are staffed until midnight. Since we can't close the
clusters to refresh all the machines at once, we do a couple each day.
To make a long story short, there's just not a lot of time to waste
playing with different applications. People put all sorts of programs
and inits that can conflict with the system, so instead of going through
all the folders (Control Panels, Extensions, Preferences) we just trash
'em all. Trashing the System and Finder are temporary solutions, which
I use for those times when Word and WordPerfect crash on start-up...
Looks like I'll have to shell out some bucks for a scriptable Finder...
(Did I mention that I'm doing this all on my own and I'm not getting
paid for it? Working hard just to find some way to cut corners. =)
--
Michael Edmondson -=- ccastme@acme.gatech.edu -=- Macintosh User Assistant
Georgia Tech: Where the people work, and the computers don't.
=========================================================================
Date: Wed, 18 May 1994 15:37:48 CDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tom Donovan <donovan@COVIS.NWU.EDU>
Subject: Re: [?] Erase Disk in Finder
>I work as a User Assistant at Georgia Tech, and a weekly routine is to
>completely erase the hard drives of everything and then reinstall the
>system software off of the local server. (A scripting nightmare, and I'm
>just a beginner too!) I've looked all over and have never found an 'Erase
>Disk' scripting addition. I've considered using Menu Events, but wonder if
>perhaps someone else had another suggestion.
>
>The whole refresh procedure consists of zapping the PRAM, booting off a
>floppy (which doesn't have much space to begin with), erasing the hard
>drive after making sure it has the right name, mounting the server and then
>copying the neccessary folders onto the hard drive, then rebooting and
>setting all the control panels. Although when looking at the entire
>process, I think just the first part (before rebooting) would suffice...for
>now.
>
>Hey, it's a great way for a beginner to learn how to script..
>Start an enormous task before learning the basics ;)
>
>Michael Edmondson -=- ccastme@acme.gatech.edu -=- Macintosh User
>Assistant
Michael,
Have you ever heard of RevRdist? It does exactly what you need, if I
understand your message correctly. We use it to keep two small labs of
Quadra 700s clean. It works by comparing the client hard disk to a master
folder on the server. You use a script to control how RevRdist handles
discrepancies b/w the client and the master: delete anything found on the
client that doesn't exist on the master, replace anything that has
disappeared from the client, replace a client version of a file with a
newer version from the master, lock files on the client, make files
invisible on the client, and much more.
You decide when RevRdist runs. We put it in the Startup Items folder so a
restart is all that is needed to clean up a client Mac.
There is also an extension (called RRHelper) that you configure to maintain
a whole bunch of settings, like printer selection, volume name, Mac name,
MacTCP settings, sound volume, monitor settings, virtual memory, etc. It
loads before any other extensions and resets any settings that have been
changed (it's even smart enough to force a restart if it resets something
like virtual mem.).
I highly recommend RevRdist/RRHelper to keep lab machines clean. Let me
know if you would like some more info.
--Tom
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Tom Donovan "The city is a place where a small boy, as he walks
Support Specialist through it, may see something that will tell him what
CoVis Project he wants to do his whole life."
Northwestern Univ.
--Louis I. Kahn
E-mail: donovan@covis.nwu.edu
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=========================================================================
Date: Wed, 18 May 1994 15:59:37 CDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tom Donovan <donovan@COVIS.NWU.EDU>
Subject: Re: [?] Erase Disk in Finder
>simplier that way! Sure we could use all sorts of optimizers and such
>utilities, but initialization is FREE! OIT is very cheap, which brings
>up another issue -- how much is it going to cost to automate this?
I forgot to mention that RevRdist is free!
--Tom
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Tom Donovan "The city is a place where a small boy, as he walks
Support Specialist through it, may see something that will tell him what
CoVis Project he wants to do his whole life."
Northwestern Univ.
--Louis I. Kahn
E-mail: donovan@covis.nwu.edu
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=========================================================================
Date: Wed, 18 May 1994 14:22:38 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: [?] Erase Disk in Finder
>First of all, thanks for all the input, suggestions and opinions.
>
>> You're kidding, right? You do this every week!? How many Macs do you
>> have to do this for?
>
>Unfortunately, no, I'm not kidding. (Hey, they're not MY rules!)
>We have six Mac labs (not total, of course; these are the public ones),
>each lab has around 40 Macs. And of course, the reason we initialize
>instead of simply erasing the unneccessary files is because -- it's
>simplier that way! Sure we could use all sorts of optimizers and such
>utilities, but initialization is FREE! OIT is very cheap, which brings
>up another issue -- how much is it going to cost to automate this?
Michael,
Here's one possible method:
1. Scrounge up an external disk drive (thi$ i$ the hard part).
2. Set that drive up containing what you want a fresh lab Mac to contain,
including the System folder.
3. Carry the drive around. Shut down the target Mac...plug in your
drive...power up. Set the Mac to start up from your drive.
4. Erase, and Finder copy.
5. Shut down.
6. Unplug your drive.
Note: for most of your lab Macs, it may not be necessary to reset the
startup volume to that machine's own drive each time. Try leaving it set
to your carry-around drive (with a really unlikely name). When a Mac
starts up and can't find the designated startup volume, it picks another.
(SCSI 0, then 6 down to 1, as I recall, are checked.)
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Wed, 18 May 1994 18:19:29 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Edmondson <ccastme@PRISM.GATECH.EDU>
Subject: Re: [?] Erase Disk in Finder
In-Reply-To: <199405182204.SAA14985@acme.gatech.edu> from "Tom Donovan" at May
18, 94 03:37:48 pm
Ummm.. I got this letter after the other one.. I think that means I'm getting
email out of order now. *sigh* God this school sux!
> Have you ever heard of RevRdist?
In short, no, I've never heard of RevRdist, but it does sound EXACTLY like
what I need.. so where do I get it? =)
> I highly recommend RevRdist/RRHelper to keep lab machines clean. Let me
> know if you would like some more info.
more, More, MORE! Gimme, GIMME! =) If it works, it would be GREAT!
--
Michael Edmondson -=- ccastme@acme.gatech.edu -=- Macintosh User Assistant
Georgia Tech: Where the people work, and the computers don't.
=========================================================================
Date: Wed, 18 May 1994 20:38:05 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Lavallee, Marc" <r27764@ER.UQAM.CA>
Subject: Re: [?] Erase Disk in Finder
One of the best remote finder scripting tool is "FinderEvents", a
Hypercard XCMD that send Apple events to the finder. There's also plenty
of good XCMDs to copy, erase, alias, etc, especially the ones from
Rinaldi. So if you can run a Hypercard stack remotely, all operations can
be done from this stack, localy on each disk.
Marc Lavallee
r27764@er.uqam.ca
=========================================================================
Date: Wed, 18 May 1994 20:22:49 CDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tom Donovan <donovan@COVIS.NWU.EDU>
Subject: RevRdist ftp site
>Date: Wed, 18 May 94 16:37:07 PDT
>From: neilrest@ecotone.toad.com (Neil Rest)
>To: donovan@COVIS.NWU.EDU
>Subject: re: RevRdist
>
>> I forgot to mention that RevRdist is free!
>Unless I missed it (which I very well may have!), you also didn't mention
>where to get it!
> Neil
You certainly didn't miss it--it wasn't there! My apologies for the
omission. I'm new to university computing and I assumed that RevRdist was
more widely known.
You can get it by anonymous ftp from ftp.cc.purdue.edu in the directory
/pub/mac. The documentation is in a separate file.
If you have trouble making it do what you want, there is a RevRdist mailing
list at listserv@sage.cc.purdue.edu ('subscribe revrdist your name')
--Tom
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Tom Donovan "The city is a place where a small boy, as he walks
Support Specialist through it, may see something that will tell him what
CoVis Project he wants to do his whole life."
Northwestern Univ.
--Louis I. Kahn
E-mail: donovan@covis.nwu.edu
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=========================================================================
Date: Thu, 19 May 1994 18:31:17 +1200
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Norris <michael.norris@STONEBOW.OTAGO.AC.NZ>
Subject: AppleScript globals in hypercard
Firstly, thanks to John, Jon & Tom for replying to my query.
One other question about AppleScripts in a HyperCard environment - can they
have their own global variables or does it have to use HC's?
EG:
In one button:
on mouseUp
global bob
copy "HI" to bob
end mouseUP
in another:
on mouseUP
global bob
display dialog bob
end mouseUP
Clicking on the first button, and then on the second usually ends up either
with nothing displayed in a dialog box or with a "bob is not defined"
notice.
Any help?
Cheers,
Michael Norris,
CAL Consultant,
University of Otago,
PO Box 56,
Dunedin,
New Zealand.
---------------------
Ph:(03) 479-7705
E-Mail: michael.norris@stonebow.otago.ac.nz
=========================================================================
Date: Thu, 19 May 1994 09:17:18 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Herb Schilling <hschilling@LERC.NASA.GOV>
Subject: Re: Script handlers strangeness
Hello,
A while ago, I sent out a solution to a problem I had with calling
handlers in script objects in Frontmost. Since then, I have made the code
a little simpler. Here it is. ( I also changed "yoursTruly" to "self". )
The "-- **********" indicates a modified line.
===========================
In application script
===========================
on run()
set thing1 to CreateThing()
end run
on CreateThing() -- "constructor" of thing
script thing
property self : {} -- *******
on PrivateRoutine()
-- do something
end PrivateRoutine
on PublicRoutine()
tell self to PrivateRoutine() -- **********
end PublicRoutine
end script
set self of result to result -- **********
end CreateThing
===========================
In window script
===========================
tell my thing1 to PublicRoutine()
--
Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
sshws@convx1.lerc.nasa.gov
AppleLink: SCHILLING.H
=========================================================================
Date: Thu, 19 May 1994 09:30:52 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Myers <dcmyers@ACCESS.DIGEX.NET>
Subject: "Coprocessor not installed" bomb in PPC version of Frontier
Just upgraded to the native version of UserLand Frontier yesterday.
Everything worked great, until I quit the application. Immediately
and invariably upon quitting, I get the "Coprocessor not installed"
bomb. Happens every time. Has anybody seen this? A bug, or did I
not install something I was supposed to install?
-David.
____________________________________________________
David C. Myers
dcmyers@access.digex.net
=========================================================================
Date: Thu, 19 May 1994 08:52:04 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: "Coprocessor not installed" bomb in PPC version of Frontier
In-Reply-To: Your message of "Thu, 19 May 94 09:30:52 CDT"
> Just upgraded to the native version of UserLand Frontier yesterday.
> Everything worked great, until I quit the application. Immediately
> and invariably upon quitting, I get the "Coprocessor not installed"
> bomb. Happens every time. Has anybody seen this? A bug, or did I
> not install something I was supposed to install?
I'm sure Doug or John will have an explanation for this, but I did notice that
there's a PPC updater on CompuServe. Not having a PowerMac, I didn't pulll it
down. Perhaps someone who does have it could mail it to me and I'll put it on
gaea?
pf
=========================================================================
Date: Thu, 19 May 1994 07:13:51 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: "Coprocessor not installed" bomb in PPC version of Frontier
>Just upgraded to the native version of UserLand Frontier yesterday.
>Everything worked great, until I quit the application. Immediately
>and invariably upon quitting, I get the "Coprocessor not installed"
>bomb. Happens every time. Has anybody seen this? A bug, or did I
>not install something I was supposed to install?
I haven't seen that crash here (and I've been using the native PPC version
of Frontier for some time). Most of the things you might forget to install
will cause the program to refuse to start up if they are missing.
Did you install the 2.0.1 version of Apple's Thread Manager? [Supplied
with PowerMac upgrade.]
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Thu, 19 May 1994 10:44:59 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Myers <dcmyers@ACCESS.DIGEX.NET>
Subject: Re: "Coprocessor not installed" bomb in PPC version of Frontier
>>Just upgraded to the native version of UserLand Frontier yesterday.
>>Everything worked great, until I quit the application. Immediately
>>and invariably upon quitting, I get the "Coprocessor not installed"
>>bomb. Happens every time. Has anybody seen this? A bug, or did I
>>not install something I was supposed to install?
>
>I haven't seen that crash here (and I've been using the native PPC version
>of Frontier for some time). Most of the things you might forget to install
>will cause the program to refuse to start up if they are missing.
>
>Did you install the 2.0.1 version of Apple's Thread Manager? [Supplied
>with PowerMac upgrade.]
>
> --John
I've witnessed Frontier's refusal to launch when, for example, I boot up
with extensions turned off. No, it certainly does start up -- in fact,
it works great, until the fateful moment of command-Q. I've been using
ThreadManager 2.0.1 for a month now; the AppleScriptLib and ObjectLib
(or whatever they're called) have been installed since I got the 6100.
(I didn't install the versions included with the Frontier upgrader,
but I assume they're no different than the ones that came with the
machine. They *looked* identical, in byte count, version number, etc.)
-David.
____________________________________________________
David C. Myers
dcmyers@access.digex.net
=========================================================================
Date: Thu, 19 May 1994 08:13:24 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: Invisible Scripts !!
>The menu command "Quit" (or command-Q) won't have any effect.
>For quitting you must use an <<unlock>> script (see below) or command-alt-esc.
In any script application, if you press Command-Shift-Q the Quit handler
will not be called. This will get around malfunctioning quit handlers or
techniques like this.
Jon
=========================================================================
Date: Thu, 19 May 1994 11:39:35 EST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Aaron E. McClennen" <Aaron_E._McClennen@HABITAT.ORG>
Organization: Habitat for Humanity International
Subject: Re: [?] Erase Disk in Finder
This is actually a variation of what you need, but it works for what we need.
We
were installing about 4 Macs a week for several months and I wrote a suite of
scripts to ease the process.
There is an external HD that we boot from, reformat the internal HD, then
launch
frontier. the first script sets the time renames the HD sets up some drop
folders then throws up a dialog box i created in resedit for the operator to
choose what software, and system to install.
The operator then restarts the machine with the internal HD as the system disk.
and runs a couple of other scripts. One to open all the control panels so they
can be configured properly. (for a while this was done with quickkeys, but that
got dropped in a revision) and another to create aliases for all applications
in
the first few levels of the HD. Some are placed in Apple Menu Items while
others
are placed in a temporary folder for easy disposal.
A couple of related scripts for when a person is given a better machine we have
scripts that go through the System, Software, and Utilities folders looking for
anomalies that will need to be copied to the new machine.
Sorry to ramble on blowing my own horn, but Michael's problem inspired me to
share what I have done. Besides I will be at GA tech in the fall as a masters
student.
Aaron_E._McClennen@habitat.org
Habitat for Humanity International
"Building houses with GodUs people in need."
=========================================================================
Date: Thu, 19 May 1994 14:39:23 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Shaddar@AOL.COM
Subject: Choose Folder?
Excuse me if this is a stupid question, I'm just getting started with
applescript...
Is there any way to let the user choose a folder similarly to the "choose
file" command?
Thanks in advance :-)
=========================================================================
Date: Thu, 19 May 1994 14:00:03 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Choose Folder?
In-Reply-To: Your message of "Thu, 19 May 94 14:39:23 EDT"
>Excuse me if this is a stupid question, I'm just getting started with
>applescript...
>
>Is there any way to let the user choose a folder similarly to the "choose
>file" command?
Check out the Choose File/Folder osax in the Script Tools set of osaxen.
(ftp://gaea.kgs.ukans.edu/applescript/osaxen/ScriptTools1.3.sit.hqx)
>Thanks in advance :-)
You're welcome. :-)
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Thu, 19 May 1994 15:12:35 CDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Dave Hillman <d-hillman@UCHICAGO.EDU>
Subject: Sending Eudora Message
I'd appreciate it if somebody could help with this Eudora script I've
downloaded from gaea. The SendMail droplet only seems to Queue the message
containing the dropped file, even if I name the droplet "myEmailAddress S"
which according to the script description should tell Eudora to send the
file immediately.
any help much appreciated,
dave
________________________________________________________________________
Dave Hillman "Some people love the sound of their own voice...
d-hillman@uchicago.edu I love the sound of
my own footsteps."
=========================================================================
Date: Thu, 19 May 1994 23:18:00 +0100
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Christian Orellana <muscabo@DFI.AAU.DK>
Subject: Re: Sending Eudora Message & a question!
>I'd appreciate it if somebody could help with this Eudora script I've
>downloaded from gaea. The SendMail droplet only seems to Queue the message
>containing the dropped file, even if I name the droplet "myEmailAddress S"
>which according to the script description should tell Eudora to send the
>file immediately.
>
>any help much appreciated,
>dave
>
Since I'm responsible for this script, I suppose I should be the one to
answer you.
I the dialog "switches", which you get at through the "special" menu in
Eudora, try turning "send on check" on - that should do it.
If for some reason you do not want to do that, simply change the line
"connect" (in the last part of the script) to "connect with send", which
should work just as well.
I would like to mention that I am very new to AppleScripting, and only
wrote this script because nobody else seemed to have done anything similar.
Therefore the script is far from perfect, so if any of you script wizzards
out there would like to optimize it - be my guest...
I, for one, would like to see a lot more contributed scripts of various
kinds on Gaea, by some of all the scripters out there, for us newbies to
study and use.
Oh - and a question. Why is it that running a script with osa Menu halts
everything else, making it impossible to switch applications while the
script is running?
Is there a fix for this?
Best regards -
Christian A.Borlund Orellana
Institute of Physics and Astronomy Aarhus University.
______________________________________________________
Internet e-mail: muscabo@dfi.aau.dk
voice: +45-86102798
mail: Dr.Margrethesvej 11,3.th.
8200 Aarhus N, DENMARK.
______________________________________________________
=========================================================================
Date: Thu, 19 May 1994 18:47:00 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: VictorOJ@AOL.COM
Subject: Re: Sending Eudora Message & a question!
HOW DO I INsUBSCRIBE to tHE LIST??
=========================================================================
Date: Thu, 19 May 1994 16:58:11 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
Subject: Re: Sending Eudora Message & a question!
>HOW DO I INsUBSCRIBE to tHE LIST??
Gawd, an AOL user...
Send "SIGNOFF MACSCRPT" to LISTSERV@DARTCMS1.BITNET (or
LISTSERV@DARTCMS1.DARTMOUTH.EDU).
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"I'd feel worse if I weren't under such heavy sedation..."
-David St. Hubbins, Spinal Tap
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
=========================================================================
Date: Thu, 19 May 1994 16:30:21 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "William E. Elston" <welston@HALCYON.HALCYON.COM>
Subject: Re: Sending Eudora Message & a question!
>HOW DO I INsUBSCRIBE to tHE LIST??
>Date: Thu, 5 May 1994 10:28:44 EDT
>Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>
>Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.DARTMOUTH.EDU> From:
>"Andy J. Williams" <Andy.J.Williams@DARTMOUTH.EDU> Subject: MS: Monthly
>Admin Mailing
>X-To: MacScripting <MACSCRPT@dartcms1.Dartmouth.EDU>
>To: Multiple recipients of list MACSCRPT <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>
>
>Save this mail message. It includes all the e-mail addresses you need when
>dealing with the Mac Scripting mailing list.
>
>*** To Unsubscribe from this list:
>
>Send to: LISTSERV@dartmouth.edu
>Subject: unsubscribe
>Message: signoff macscrpt
>
>
>*** To subscribe to this list:
>
>Send to: LISTSERV@dartmouth.edu
>Subject: subscribe
>Message: subscribe macscrpt <your full name here>
>
>
>*** To get other info on using this automated system:
>
>Send to: LISTSERV@dartmouth.edu
>Subject: help
>Message: help
>
>
>*** To ask the human moderators a question:
>
>Send to: MacScripting-Request@dartmouth.edu
>
>
>*** To send a message to the mailing list:
>
>Send to: MacScripting@dartmouth.edu
>
>
>Thanks.
>
>-The Moderators (a very offcial way of saying "Fred & Andy")
>
=========================================================================
Date: Thu, 19 May 1994 17:45:29 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Doug Baron <userland@NETCOM.COM>
Subject: Re: "Coprocessor not installed" bomb in PPC version of Frontier
In-Reply-To: <199405191512.IAA13426@mail2> from "David Myers" at May 19,
94 10:44:59 am
> it works great, until the fateful moment of command-Q. I've been using
> ThreadManager 2.0.1 for a month now; the AppleScriptLib and ObjectLib
This sounds like the pre-release version of ThreadManger 2.0.1. It had a
bug that caused the crash when quitting. The final version doesn't have
the problem.
Send me email if you need help locating the extension.
Doug
userland@netcom.com
=========================================================================
Date: Fri, 20 May 1994 00:32:01 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jonathan Bauer <jhbauer@PANIX.COM>
Subject: Director/MIDI/AppleScript etc summary
I recently posted three related (at least in my mind) questions on three
separate lists, including this one, having to do with using MIDI over a
network, using Director with MIDI, and AppleScript and MIDI. I
concatenated the replies into a single text file (about 27k) with almost no
editing. I'd post it to the list, but I don't want to burden anyone with a
27k mailing they aren't interested in. So ... anyone who wants a copy,
just send me email with the *exact* subject line: "send text" (no quotes)
and _nothing_ in the body of the message. After a few days, I'll send it
out.
Is this a good way to deal with this? Should I post it if I get a
substantial number of replies? How many is substantial??
Thanks to everyone who replied!
/Jonathan <jhbauer@panix.com>
=========================================================================
Date: Fri, 20 May 1994 08:37:15 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Myers <dcmyers@ACCESS.DIGEX.NET>
Subject: Re: "Coprocessor not installed" bomb in PPC version of Frontier
>> it works great, until the fateful moment of command-Q. I've been using
>> ThreadManager 2.0.1 for a month now; the AppleScriptLib and ObjectLib
>
>This sounds like the pre-release version of ThreadManger 2.0.1. It had a
>bug that caused the crash when quitting. The final version doesn't have
>the problem.
>
>Send me email if you need help locating the extension.
>
>Doug
>userland@netcom.com
Doug--
My infinite gratitude. I picked up ThreadManager 2.0.1 a month ago
from ftp.apple.com, not realizing at the time that it was beta code.
Replacing my copy with the one that came on the upgrade disk solved
the problem completely.
Native Frontier is indeed much faster...
Unrelated question: Has anybody interfaced Frontier to MacTCP, via
a TCP osax or something? I am considering doing just such a thing,
as a way to get back into Mac programming. I understand that osaxen
are considerably easier to write than full-blown Mac apps. Would
anybody find such an osax useful? Any pointers on osax and MacTCP
programming? Thanks.
-David.
____________________________________________________
David C. Myers
dcmyers@access.digex.net
=========================================================================
Date: Fri, 20 May 1994 08:38:01 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Director/MIDI/AppleScript etc summary
In-Reply-To: Your message of "Fri, 20 May 94 00:32:01 CDT"
Hi Jonathan,
>I recently posted three related (at least in my mind) questions on three
>separate lists, including this one, having to do with using MIDI over a
>network, using Director with MIDI, and AppleScript and MIDI. I
>concatenated the replies into a single text file (about 27k) with almost no
>editing. I'd post it to the list, but I don't want to burden anyone with a
>27k mailing they aren't interested in. So ... anyone who wants a copy,
>just send me email with the *exact* subject line: "send text" (no quotes)
>and _nothing_ in the body of the message. After a few days, I'll send it
>out.
>
>Is this a good way to deal with this? Should I post it if I get a
>substantial number of replies? How many is substantial??
Thanks for collecting and concatenating the replies. If you get a substantial
number of requests, we can put it on the MacScripting ftp site at
gaea.kgs.ukans.edu. If not, I would still like to get a copy to place there.
Thanks.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Fri, 20 May 1994 07:54:07 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: QuarkXPress: selecting...how?
Given this starting condition:
There is an insertion point established, and an object specifier for
some later point in the document is known.
Problem:
Select the text from the insertion point thru the text implied by the
specifier.
Sorry...I have to ask, since I can't try it myself (no XPress). [QuicKeys
isn't an option in this case since the physical location of the second
object varies.]
Thanks. --John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Fri, 20 May 1994 14:13:55 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jonathan Bauer <jhbauer@PANIX.COM>
Subject: Re: Director/MIDI/AppleScript etc summary
I've sent a copy of the replies to Fred Terry for posting at the ftp site
filename: MIDI/AS/Appletalk.sit (Phew, there was more interest than I
anticipated!). Don't know where he'll put it.
/jonathan
>>
>>Is this a good way to deal with this? Should I post it if I get a
>>substantial number of replies? How many is substantial??
>
>Thanks for collecting and concatenating the replies. If you get a substantial
>number of requests, we can put it on the MacScripting ftp site at
>gaea.kgs.ukans.edu. If not, I would still like to get a copy to place there.
>
>Thanks.
>
>pf
>
>
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Fri, 20 May 1994 11:31:40 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: fwd
>> From: Paul.L.Merchant.Jr@Dartmouth.EDU (Paul L Merchant Jr.)
>> Reply-To: Paul.Merchant@Dartmouth.EDU
>> Subject: Resources
>> To: cwarrior@netcom.com
>>
>> Does anyone have any suggestions for maintaining resources that are shared
>> among different projects? It seems awfully primitive to have to keep a
>> different copy of these resources for each project.
>>
>> I've been using Think C to compile a resource file (sorry) and then manually
>> copying it a file to use with CodeWarrior, but this gets to be a headache.
Learn Rez (and DeRez, for turning ResEdit output into Rez source). The
fact that you are compiling resources using Think Project Manager suggests
you already use Rez source (the .r files).
Use ToolServer, running the Rez tool, to create resource files. That is
Rez's job.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Fri, 20 May 1994 14:34:44 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Shaddar@AOL.COM
Subject: Difference between from idle and from finder?
I am writing a script agent to watch a folder and sort out mail but want it
to be configurable via double-clicking it (to configure destination folder
and search prefix). Is there any way to do this that won't require input
every time it comes out of idle, but only when I want to configure it? I
have thought of a separate configuring script but would like to keep it as
one app.
Thanks!
~Josh Baer~
=========================================================================
Date: Fri, 20 May 1994 14:16:52 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Director/MIDI/AppleScript etc summary
In-Reply-To: Your message of "Fri, 20 May 94 14:13:55 CDT"
Everyone,
>I've sent a copy of the replies to Fred Terry for posting at the ftp site
>filename: MIDI/AS/Appletalk.sit (Phew, there was more interest than I
>anticipated!). Don't know where he'll put it.
>
>/jonathan
>
You'll find them in
ftp://gaea.kgs.ukans.edu/applescript/docs/AS_and_MIDI.hqx
Have fun. Thanks again, Jonathan.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Fri, 20 May 1994 15:22:02 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
Subject: Re: Difference between from idle and from finder?
>I am writing a script agent to watch a folder and sort out mail but want it
>to be configurable via double-clicking it (to configure destination folder
>and search prefix). Is there any way to do this that won't require input
>every time it comes out of idle, but only when I want to configure it? I
>have thought of a separate configuring script but would like to keep it as
>one app.
>
>Thanks!
>
>~Josh Baer~
Josh, here's the top of my script that fetches and sorts eemail using Eudora.
I also sometimes want stuff forwarded to another account, so I have it ask at
startup. If I want to change the setting (which I rarely do) then I quit
and restart it.
--------------------script---------------------
on run
display dialog "Do you want to forward messages to the Mull0079 account?"
buttons {"Yes", "No"} default button 2
-- (the line above ("buttons...") is wrapped around from the previous line)
set theForwarding to button returned of the result
end run
on idle
if "Eudora1.4.2" is in ((list applications) as string) then
try
tell application "Eudora1.4.2"
with timeout of 1200 seconds
(etc. etc.)
end idle
--------------------script---------------------
-DM
Desmond K. Mullen - University of Minnesota, Office of Admissions
mulle009@maroon.tc.umn.edu - 612/625-0824
=========================================================================
Date: Fri, 20 May 1994 20:45:14 GMT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Robert K. Terra" <Robert_Terra@BROWN.EDU>
Organization: Brown University
Subject: Deleting a non-empty folder (err -47)
Hi all, Me again.
Is it possible to delete a folder that has files/folders in it? I've tried
every possible "delete/remove/movetotrash etc" command that I can think of.
I keep getting a "File Busy" or "Error -47" (same thing) error if the
folder has something in it. I at first thought this might be because I'm
trying to delete a folder on a fileserver, but it seems to happen on my HD
also.
Any way around this without going into each folder then each subfolder(if
any) and deleting all the files and then backing out untill the folder that
I want to delete is finally empty?
Thx in advance for your help!
Bob
=========================================================================
Date: Fri, 20 May 1994 13:45:23 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Doug Baron <userland@NETCOM.COM>
Subject: Re: QuarkXPress: selecting...how?
>Given this starting condition:
> There is an insertion point established, and an object specifier for
>some later point in the document is known.
>
>Problem:
> Select the text from the insertion point thru the text implied by the
>specifier.
>
>Sorry...I have to ask, since I can't try it myself (no XPress). [QuicKeys
>isn't an option in this case since the physical location of the second
>object varies.]
>
> Thanks. --John
>
>--
>jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
>finger me to prove I'm all wet (Port Ludlow rainfall numbers).
Here's what I came up with:
with objectmodel, qxp, defs, document [1]
local (box, sel, selobj = objspec (selection))
box = get (currentBox)
with box
sel = get (selobj)
set (selobj, text [sel to word [12]])
return
The "selobj" local disambiguates the object reference within the "with"
statement.
I found that asking QXP for the selection generates an "object not found"
error if there is text selected, rather than an insertion point. Or, it
will return an invalid specifier. I'm not sure what to do about that. I'm
using 3.2 ,so it might be a problem that's been fixed in 3.3.
Doug
=========================================================================
Date: Fri, 20 May 1994 17:06:11 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Deleting a non-empty folder (err -47)
In-Reply-To: <no.id> from "Robert K. Terra" at May 20, 94 08:45:14 pm
--Robert K. Terra wrote:
>
>Is it possible to delete a folder that has files/folders in it? I've tried
>every possible "delete/remove/movetotrash etc" command that I can think of.
>I keep getting a "File Busy" or "Error -47" (same thing) error if the
>folder has something in it. I at first thought this might be because I'm
>trying to delete a folder on a fileserver, but it seems to happen on my HD
>also.
Well, assuming you are using the Scriptable Finder to do the
deleting, all you need to do is say:
tell application "Finder"
delete folder "My HD:My Folder"
empty trash
end tell
You have to use the empty trash command because the Scsriptable
Finder won't just delete a folder. It moves the folder to the trash. If
you were to use the command delete file "My HD:My Folder: My File" the
Scriptable Finder will delete the file without using the trash.
-Hades
=========================================================================
Date: Fri, 20 May 1994 21:55:11 GMT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Robert K. Terra" <Robert_Terra@BROWN.EDU>
Organization: Brown University
Subject: Re: Deleting a non-empty folder (err -47)
In article <GRAND%LISTS.APPLESCRIPT.1395@brownvm.brown.edu>, "Brian V.
Hughes" <hades@COOS.DARTMOUTH.EDU> wrote:
> --Robert K. Terra wrote:
> >
> >Is it possible to delete a folder that has files/folders in it? I've tried
> >every possible "delete/remove/movetotrash etc" command that I can think of.
> >I keep getting a "File Busy" or "Error -47" (same thing) error if the
> >folder has something in it. I at first thought this might be because I'm
> >trying to delete a folder on a fileserver, but it seems to happen on my HD
> >also.
>
> Well, assuming you are using the Scriptable Finder to do the
> deleting, all you need to do is say:
>
> tell application "Finder"
> delete folder "My HD:My Folder"
> empty trash
> end tell
>
> You have to use the empty trash command because the Scsriptable
> Finder won't just delete a folder. It moves the folder to the trash. If
> you were to use the command delete file "My HD:My Folder: My File" the
> Scriptable Finder will delete the file without using the trash.
>
> -Hades
Sorry to mention, I'm still using AS 1.0 & no Scriptable Finder.
Thx bob
=========================================================================
Date: Fri, 20 May 1994 20:21:56 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Leonard Rosenthol <leonardr@NETCOM.COM>
Subject: Re: Sending Eudora Message & a question!
>Oh - and a question. Why is it that running a script with osa Menu halts
>everything else, making it impossible to switch applications while the
>script is running?
>
Shouldn't do that at all! OSA Menu just sends the script to the
application you choose it in, things happen just fine in the background if
neccessary. Do make sure that you have OSA Menu 1.0.1!
Leonard
-----------------------------------------------------------------------------
Leonard Rosenthol Internet: leonardr@netcom.com
Director of Advanced Technology AppleLink: MACgician
Aladdin Systems, Inc. GEnie: MACgician
=========================================================================
Date: Sat, 21 May 1994 14:18:09 +0100
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Christian Orellana <muscabo@DFI.AAU.DK>
Subject: Re: Sending Eudora Message & a question!
>>Oh - and a question. Why is it that running a script with osa Menu halts
>>everything else, making it impossible to switch applications while the
>>script is running?
>>
> Shouldn't do that at all! OSA Menu just sends the script to the
>application you choose it in, things happen just fine in the background if
>neccessary. Do make sure that you have OSA Menu 1.0.1!
>
>Leonard
>
Hi!
I do have OSA Menu 1.0.1. The script causing the problem is very simple:
tell application "Eudora 2.0.2"
try
with timeout of 600 seconds
connect with Send
end timeout
on error
return
end try
end tell
When running this script by double-clicking it, or through NowMenus, the
script tells Eudora to check for mail, and all happens in the background,
without problems - I hardly notice anything is going on.
Where as running it from OSA Menu causes everything to halt while Eudora is
connecting, checking for mail, and sending, making it impossible to switch
applications while the process is going on. (I use Eudora over a serial
connection).
If "activate application "Eudora 2.0.2" is put as the first line of the
script things work fine as well, but not in the background!
Is this a bug in Eudora, OSA Menu, or the script, and is there a workaround?
Any help appreciated.
Best regards -
Christian A.Borlund Orellana
Institute of Physics and Astronomy Aarhus University.
______________________________________________________
Internet e-mail: muscabo@dfi.aau.dk
voice: +45-86102798
mail: Dr.Margrethesvej 11,3.th.
8200 Aarhus N, DENMARK.
______________________________________________________
=========================================================================
Date: Sat, 21 May 1994 15:17:42 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Lavallee, Marc" <r27764@ER.UQAM.CA>
Subject: Hypercard 2.2 OSA scripting
Maybe most of you will not learn anything new from my discovery, but here
it is anyway, one the best way to use the Quickey's OSAX with Hypercard 2.2.
This trick is from the Applelink "AppleScript Scripting Discussion" forum.
--------------------------------------------------------------------------
One way I have found to execute a Quickeys script in HyperCard is to write
Quickey script in the button editor, selecting Quickeys as the language. Then
in the stack script, put the following handler:
on mouseUp
put the target into t
if the ScriptingLanguage of t is "QuicKeys"
then do script of t as Quickeys
end mouseUp
clicking on the button will then execute the quickey script, as long as the
"mouseUp" message doesn't get stoopped by another handler in the card or
background script. The "pass mouseUp" command fixes that.
--------------------------------------------------------------------------
The important thing to consider here is
"do <container> as <scripting langage>"
The scripting popup menu is then useless, as long as you know the langage of
your scripts. So I prefer to write my scripts in text fields.
BTW, to switch to another application I'm using the Hypertalk "domenu"
command, since the Quickey "Menu" command never worked for that simple task.
Marc Lavallee
r27764@er.uqam.ca
=========================================================================
Date: Sun, 22 May 1994 04:32:29 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Chris Brannon <cbrannon+@PITT.EDU>
Subject: Renaming files
Has anyone out there written a nifty little script to rename files, perhaps
allowing wildcards or grepping? I'd like to see what you've done.
Thanks,
Chris
Regards,...Chris
+--------------------------------------------------------------------------
Christopher B. Brannon University of Pittsburgh
cbrannon+@pitt.edu THE*TRUTH*IS*OUT*THERE Political Science
=========================================================================
Date: Sun, 22 May 1994 09:06:41 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Pedro N Safier <pns@UCLINK2.BERKELEY.EDU>
Subject: How to open MacPPP?
Hi,
I am trying to make MacPPP to open a modem connection without success. Has
anybody done this before?
On a more general level: how can one script a control panel?
Cheers,
Pedro
=========================================================================
Date: Sun, 22 May 1994 13:06:29 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: File Sharing Control?
Is there a way to turn File Sharing on & off from a script? I've pawed
through my collection of osaxen and can't seem to find one that does this.
I suppose I can write my own, but...
Jon
=========================================================================
Date: Sun, 22 May 1994 16:13:01 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: File Sharing Control?
In-Reply-To: <no.id> from "Jon Pugh" at May 22, 94 01:06:29 pm
--Jon Pugh wrote:
>
>Is there a way to turn File Sharing on & off from a script? I've pawed
>through my collection of osaxen and can't seem to find one that does this.
Well, the only way that I've been able to find thus far is caling a
QuicKeys shortcut via QuicKeys Toolbox. It would be an extremely simple
"play by name" call.
>I suppose I can write my own, but...
Hey, sounds like a great "addition" to Jon's Commands. ;->
-Hades
=========================================================================
Date: Sun, 22 May 1994 14:22:47 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mike Cohen <isis@NETCOM.COM>
Subject: Re: File Sharing Control?
In-Reply-To: <199405222030.NAA25626@mail2.netcom.com> from "Jon Pugh" at May
22, 94 01:06:29 pm
>
> Is there a way to turn File Sharing on & off from a script? I've pawed
> through my collection of osaxen and can't seem to find one that does this.
> I suppose I can write my own, but...
>
It can be done with a QuicKeys "System 7 Special" macro. Don't you have an
osax that will play a quickey sequence?
--
Mike Cohen | ISIS International
(818) 788-4747 Voice | isis@netcom.com | ALink: D6734
(818) 501-0653 Fax | NewtonMail, eWorld: MikeC | AOL: MikeC20
Home Page: file://netcom3.netcom.com/pub/isis/home.html
=========================================================================
Date: Sun, 22 May 1994 15:07:07 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: How to open MacPPP?
>Hi,
>
>I am trying to make MacPPP to open a modem connection without success. Has
>anybody done this before?
The easy way is to use this Scripting Addition (which ignores the visible
Control Panel):
ftp://gaea.kgs.ukans.edu:applescript/osaxen/MacPPPControl1.1.sit.hqx
>On a more general level: how can one script a control panel?
One can't, until control panels are written to be scripted.
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Mon, 23 May 1994 08:33:31 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: File Sharing Control?
In-Reply-To: <no.id> from "Mike Cohen" at May 22, 94 02:22:47 pm
--Mike Cohen wrote:
>
>It can be done with a QuicKeys "System 7 Special" macro. Don't you have an
>osax that will play a quickey sequence?
If you have QuicKeys 3.0 (which is the only one that can be
controlled by AppleEvents) you don't need another osax. QK comes with a
faceless background app called QuicKeys Toolbox that you can send
AppleScript commands to to execute QuicKeys shortcuts. Something like:
tell application "QuicKeys Toolbox"
play by name "FileSharing Off"
end tell
-Hades
=========================================================================
Date: Mon, 23 May 1994 11:36:27 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "George R. Brown" <gbrown@PARTECH.COM>
Subject: Opening a literal file with Script Tools 1.3
Is there a way to coerce a literal file name to what ever the result of
"choose file" returns? Open file appears to want the type resulting from a
choose file (or equivalent). Heres the example from Script Tools:
set paramFile to choose file with prompt "Select params.good ..." of
type "TEXT"
set refNum to open file paramFile for reading
I wanted to do:
set paramFileName to ":System Folder:Preferences:Send Attach Preferences"
set paramFile to open file paramFileName for reading
Thanks,
- gb (george@partech.com)
=========================================================================
Date: Mon, 23 May 1994 11:47:19 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Rob Dewhirst <robd@FARALLON.COM>
Subject: Creating a resource?
Is there an easy way to create an empty data resource in a file? With the GTQ
scripting library I can move/copy resources, but I can't seem to find an easy
way to create them.
=========================================================================
Date: Mon, 23 May 1994 11:12:09 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: telling an osax?
Summary: How do I direct or tell applescript to direct a script statement
to a specific osax?
The following AppleScript is in a HyperCard 2.2 button. When I press the
button I get the following error messages (I extracted them with an on
error handler that is not shown).
Error Message = Some parameter is missing for <<event WILDREAD>>.
Error Number = -1701
----------------
on mouseup
ReadTextFile()
end mouseup
on ReadTextFile()
set thedata to ""
set fspec to (choose file of type {"TEXT"})
set fref to open for access fspec
-- it gets this far no problem, errors generated by next line
set thedata to read fref --as "TEXT"
close access fref
return (thedata)
end ReadTextFile
----------------
It is my conjecture (please correct me if I am mistaken) that the read fref
command is being interpreted by HyperCard instead of the read/write osax in
the scripting additions folder. I would like my AppleScript scripts to be
transportable so I do not want to use the HyperCard read command, I want to
use the osax. How do I direct or tell applescript to direct the statement
to the osax? Is that the problem?
Kee Nethery
_________________________________________________________________
Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
=========================================================================
Date: Mon, 23 May 1994 12:42:37 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Opening a literal file with Script Tools 1.3
At 11:36 5/23/94 -0400, George R. Brown wrote:
>Is there a way to coerce a literal file name to what ever the result of
>"choose file" returns? Open file appears to want the type resulting from a
>choose file (or equivalent). Heres the example from Script Tools:
> set paramFile to choose file with prompt "Select params.good ..." of
>type "TEXT"
> set refNum to open file paramFile for reading
>I wanted to do:
> set paramFileName to ":System Folder:Preferences:Send Attach Preferences"
> set paramFile to open file paramFileName for reading
try something like
set paramFileAlias to alias (((path to preferences folder) as string) &
"Send Attach Preferences")
set paramFile to open paramFileAlias
The above will use the Preferences folder in the System Folder used for
starting up your Mac, which appears to be what you want. The path
":System Folder:Preferences:Send Attach Preferences"
begins at whatever the current directory is for whatever application's
context is being used when the script executes, and looks for System Folder
there. Probably not what you want.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Mon, 23 May 1994 13:02:58 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: telling an osax?
>Summary: How do I direct or tell applescript to direct a script statement
>to a specific osax?
>
>
>The following AppleScript is in a HyperCard 2.2 button. When I press the
>button I get the following error messages (I extracted them with an on
>error handler that is not shown).
>
>Error Message = Some parameter is missing for <<event WILDREAD>>.
>Error Number = -1701
>
>----------------
>on mouseup
> ReadTextFile()
>end mouseup
>
>on ReadTextFile()
> set thedata to ""
>
> set fspec to (choose file of type {"TEXT"})
> set fref to open for access fspec
>-- it gets this far no problem, errors generated by next line
> set thedata to read fref --as "TEXT"
> close access fref
>
> return (thedata)
>end ReadTextFile
>----------------
>
>It is my conjecture (please correct me if I am mistaken) that the read fref
>command is being interpreted by HyperCard instead of the read/write osax in
>the scripting additions folder. I would like my AppleScript scripts to be
>transportable so I do not want to use the HyperCard read command, I want to
>use the osax. How do I direct or tell applescript to direct the statement
>to the osax? Is that the problem?
Your conjecture seems correct to me. I notice that I have the read/write
osax sitting in a folder named "Scripting Additions (broken)". I think
that was a Power Macintosh issue, but I'm not sure at this point.
That aside, I would first try making a copy of the read/write osax, and
editing the 'aete' resource in the copy to give the read command a
different name. Then adjust your Scripting Additions folder so that only
the altered copy of the osax is there, and restart your Mac (or at the very
least quit and restart HyperCard).
If that works for you, please let us know. If that is the case, the naming
of Scripting Addition commands to avoid collisions is even harder than it
seemed before.
(Your other scripts which use the read/write osax will adjust
themselves, except for the ones you saved as text for some reason.)
Meanwhile, Jon may well have a less drastic way out. [Putting a call using
the generic event syntax inside a tell application "SomeApp" block, where
"SomeApp" is known to be running but not support the event MIGHT do the
trick, since osaxen get control when an event isn't otherwise handled.
"Finder" is a possible "SomeApp".]
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Mon, 23 May 1994 13:27:00 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: Re2: telling an osax?
John, Thank you for the reply:
>That aside, I would first try making a copy of the read/write osax, and
>editing the 'aete' resource in the copy to give the read command a
>different name. Then adjust your Scripting Additions folder so that only
>the altered copy of the osax is there, and restart your Mac (or at the very
>least quit and restart HyperCard).
I am trying to build a script for others to use. I need it to be as generic
as possible. For that reason I do not wish to alter the standard osax aete
resource and change it from "read" to something else (such as "readMod"). I
envision my scripts being used on other machines and I don't want to
coordinate who has the altered osax nor do I want to deal with what will
happen when someone swaps out the modified read/write osax for a newer
version sometime in the future.
If need be, I'll use the standard HyperCard read file commands rather than
alter the standard osax. But, I definately appreciate your answer. Under
different circumstances, I'd give it a try.
Still wondering, is there any way to "tell" an osax to do something?
Kee Nethery
_________________________________________________________________
Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
=========================================================================
Date: Tue, 24 May 1994 10:35:43 +1200
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Norris <michael.norris@STONEBOW.OTAGO.AC.NZ>
Subject: FileMaker Pro & AppleScript Bug?
HELP!
I've been having a problem with scripting FileMaker Pro whenever I do the
following:
tell application "FileMaker Pro"
do script "Import Text"
set b to number of record in database "DB"
end tell
It runs the script OK but then sits in a repeat loop not doing anything,
and according to the event log, "FileMaker Pro got an error: User canceled
out of wait loop for reply or receipt." which seems to have been brought
about by the SFGet dialog box on the screen. Is there anyway around this???
Please HELP!
Cheers,
Michael Norris,
CAL Consultant,
University of Otago,
PO Box 56,
Dunedin,
New Zealand.
---------------------
Ph:(03) 479-7705
E-Mail: michael.norris@stonebow.otago.ac.nz
=========================================================================
Date: Mon, 23 May 1994 19:57:05 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Shaddar@AOL.COM
Subject: Extensions Liscensing?
I am a high school student working on an Applescript project for my AP
Computers class as an end of the year advanced assignment. I would like to
write some script to automate some of the routine maintenence of the lab,
thereby learning more Applescript and helping out my teacher at the same
time.
The problem is that he can't run my script unless he has the scripting
extensions (Apple Event Manager and Applescript Extensions) installed on all
the hard drives (if the scripts work the way I understand them). The school
is not about to purchase 30 copies of Applescript for my final project so I
was wondering if I am legally allowed to copy the extensions onto the
school's computers. (not the software for scripting, just the two
extensions).
If not, is there any way to get Apple to let me do since it's educational and
it's not allowing them to do anything new, just run scripts I write at home?
(Also, since they are coming out with a scriptable finder which will be
available sometime soon anyway?).
thanks ;)
~Josh~
=========================================================================
Date: Mon, 23 May 1994 17:35:09 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: Re: Extensions Licensing?
>I am a high school student working on an Applescript project for my AP
>Computers class as an end of the year advanced assignment. I would like to
>write some script to automate some of the routine maintenence of the lab,
>thereby learning more Applescript and helping out my teacher at the same
>time.
Good idea.
>The problem is that he can't run my script unless he has the scripting
>extensions (Apple Event Manager and Applescript Extensions) installed on all
>the hard drives (if the scripts work the way I understand them). The school
>is not about to purchase 30 copies of Applescript for my final project so I
>was wondering if I am legally allowed to copy the extensions onto the
>school's computers. (not the software for scripting, just the two
>extensions).
Read the license agreement for AppleScript. The License that came with my
copy of AppleScript says:
"This License allows you to use the Apple Software and fonts on a single
computer, to make one copy of the entire Apple Software and fonts in
machine-readable form for backup purposes only, to copy or have copied for
you an unlimited number of copies of the Apple Event Manager, AppleScript
System Extension File, Scripting Additions, AppleScript Dialects, and
FrontMost(tm)* Runtime Code, as defined below, (collectively, the
"Distributable Software") and to distribute such copies of the
Distributable Software incorporated in applications developed by you."
There is more that talks about the requirements for the licensing agreement
for your software and what needs to appear in your about box. Sounds like
as long as you follow their requirements, there is no problem putting the
"Distributable Software" on the other computers.
Weasel Clause: I am not a lawyer, I have never been a lawyer, I don't think
I'll ever be a lawyer, and thus, you should not take my interpretation of
the Apple AppleScript software license as truth. You are on your own. Read
the license and decide for yourself.
>If not, is there any way to get Apple to let me do since it's educational and
>it's not allowing them to do anything new, just run scripts I write at home?
> (Also, since they are coming out with a scriptable finder which will be
>available sometime soon anyway?).
Which will most likely cost bucks for each computer in the school.
Kee Nethery
_________________________________________________________________
Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
=========================================================================
Date: Mon, 23 May 1994 22:08:10 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Shaddar@AOL.COM
Subject: Re: Extensions Licensing?
>>I am a high school student working on an Applescript project for my AP
>>Computers class as an end of the year advanced assignment. I would like to
>>write some script to automate some of the routine maintenence of the lab,
>>thereby learning more Applescript and helping out my teacher at the same
>>time.
>Good idea.
>>The problem is that he can't run my script unless he has the scripting
>>extensions (Apple Event Manager and Applescript Extensions) installed on
all
>>the hard drives (if the scripts work the way I understand them). The
school
>>is not about to purchase 30 copies of Applescript for my final project so I
>>was wondering if I am legally allowed to copy the extensions onto the
>>school's computers. (not the software for scripting, just the two
>>extensions).
>Read the license agreement for AppleScript. The License that came with my
>copy of AppleScript says:
>"This License allows you to use the Apple Software and fonts on a single
>computer, to make one copy of the entire Apple Software and fonts in
>machine-readable form for backup purposes only, to copy or have copied for
>you an unlimited number of copies of the Apple Event Manager, AppleScript
>System Extension File, Scripting Additions, AppleScript Dialects, and
>FrontMost(tm)* Runtime Code, as defined below, (collectively, the
>"Distributable Software") and to distribute such copies of the
>Distributable Software incorporated in applications developed by you."
>There is more that talks about the requirements for the licensing agreement
>for your software and what needs to appear in your about box. Sounds like
>as long as you follow their requirements, there is no problem putting the
>"Distributable Software" on the other computers.
>Weasel Clause: I am not a lawyer, I have never been a lawyer, I don't think
>I'll ever be a lawyer, and thus, you should not take my interpretation of
>the Apple AppleScript software license as truth. You are on your own. Read
>the license and decide for yourself.
>>If not, is there any way to get Apple to let me do since it's educational
and
>>it's not allowing them to do anything new, just run scripts I write at
home?
>> (Also, since they are coming out with a scriptable finder which will be
>>available sometime soon anyway?).
>Which will most likely cost bucks for each computer in the school.
Thanks Alot!
But one question... was that the big kit (developers) or just the run-time
kit? I have the run time kit and am afraid that it might not be the same. I
will try to check but I dont' think I have the original packaging.
Thanks Again! ;)
~Josh~
=========================================================================
Date: Mon, 23 May 1994 22:23:21 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: FileMaker Pro & AppleScript Bug?
In-Reply-To: <no.id> from "Michael Norris" at May 24, 94 10:35:43 am
--Michael Norris wrote:
>
>I've been having a problem with scripting FileMaker Pro whenever I do the
>following:
>
>tell application "FileMaker Pro"
> do script "Import Text"
> set b to number of record in database "DB"
>end tell
>
>It runs the script OK but then sits in a repeat loop not doing anything,
>and according to the event log, "FileMaker Pro got an error: User canceled
>out of wait loop for reply or receipt." which seems to have been brought
>about by the SFGet dialog box on the screen. Is there anyway around this???
Well, can you tell us what the commands in the Import Text script
are. For some reason your script is putting up a dialog box. If you can
stop the script from putting up this dialog box then AppleScript will be
able to complete it's script.
Also, when making AppleScript calls to FM Pro, it is always a good
idea to wrap the commands in a "with timout..." control statement. This
will prevent AppleScript from timing out on the event calls while it is
waiting for a continue event callback from FM Pro.
-Hades
=========================================================================
Date: Tue, 24 May 1994 14:55:19 +1200
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Norris <michael.norris@STONEBOW.OTAGO.AC.NZ>
Subject: Re: FileMaker Pro & AppleScript Bug?
>>I've been having a problem with scripting FileMaker Pro whenever I do the
>>following:
>>
>>tell application "FileMaker Pro"
>> do script "Import Text"
>> set b to number of record in database "DB"
>>end tell
>>
>>It runs the script OK but then sits in a repeat loop not doing anything,
>>and according to the event log, "FileMaker Pro got an error: User canceled
>>out of wait loop for reply or receipt." which seems to have been brought
>>about by the SFGet dialog box on the screen. Is there anyway around this???
>
> Well, can you tell us what the commands in the Import Text script
>are. For some reason your script is putting up a dialog box. If you can
>stop the script from putting up this dialog box then AppleScript will be
>able to complete it's script.
The whole idea of the script is to let the user choose which file they
want!! The thing is, when the user does choose it, nothing happens. FMaker
doesn't seem to return the required reply to AppleScript. You're right, it
does work with the 'specify file' option turned off, but I shouldn't have
to do that.
Cheers,
Michael Norris,
CAL Consultant,
University of Otago,
PO Box 56,
Dunedin,
New Zealand.
---------------------
Ph:(03) 479-7705
E-Mail: michael.norris@stonebow.otago.ac.nz
=========================================================================
Date: Tue, 24 May 1994 01:17:23 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Rob Dewhirst <robd@FARALLON.COM>
Subject: MountVolume OSAX
I have this in my scripting additions folder, and I can't seem to find its
origin. Is is part of the GTQ library? If so, it is not documented.
In any case, how do you mount a volume without a zone? Giving a zone name of ""
does not work.
=========================================================================
Date: Tue, 24 May 1994 01:09:40 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: telling an osax?
>It is my conjecture (please correct me if I am mistaken) that the read fref
>command is being interpreted by HyperCard instead of the read/write osax in
>the scripting additions folder. I would like my AppleScript scripts to be
>transportable so I do not want to use the HyperCard read command, I want to
>use the osax. How do I direct or tell applescript to direct the statement
>to the osax? Is that the problem?
Yes, you have successfully identified the problem. John's solution though,
is a bit drastic. Don't do it. There are better solutions.
First off though, you need to understand that AppleScript cares immensely
about context. It is essentially impossible to write an AppleScript which
will execute the same in a script application and in Hypercard because
every script in Hypercard has "tell app Hypercard" wrapped around it. This
means that all AppleScripts use Hypercard's terminology by default.
This means that you need to specify a new target. It can be as simple as
"tell app Finder" or using HyperTalk to run a script application or
compiled script instead.
You are probably now thinking that Hypercard is not the ideal place to
prototype your scripts. There is some truth to this. What you might want
to do instead is to create a stack with fields and write a script which
gets the text from the field and compiles and runs that. This would
essentially be the script database that I think you are trying to get.
Storing the scripts in buttons makes them Hypercard AppleScripts, which
doesn't appear to be what you want.
There is no way to directly reference an osax. Typically you merely refer
out of the current tell block with something like "my fooEvent" or
"fooEvent of me" but in this case, that should still be Hypercard. In the
case of a script application it would be the nonscriptable application and
thus an osax.
Hmm, an idea may be to use "tell AppleScript". I just tried a simple thing
with beep and it seemed to work, but I don't know if it really ran the beep
osax or called the beep command. Try it with read and see. That should
work everywhere.
Jon
=========================================================================
Date: Tue, 24 May 1994 06:57:00 EST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "I.DreimillerM@OEmail.VitroNLON"
<I+pDreimillerM+aOEmail+pVitroNLON%Vitro_NLON@MCIMAIL.COM>
Subject: StuffIt Deluxe script ??s
From: I.DreimillerM on Tue, May 24, 1994 7:55 AM
Subject: StuffIt Deluxe script ??s
To: MacScripting
This is my first attempt at writing a script (and my first list
posting). I'm using AppleScript v1.1. I wrote it based on one of
the examples I found on my StuffIt Deluxe v3.0.7 disk.
UnZip Droplet
=============
on open (docList)
repeat with sourceFile in docList
set transName to "Zip"
set commandString to "decode \"" & sourceFile & "\""
tell application "StuffIt Deluxe* $"
activate
with timeout of 10000 seconds
Translate match name transName command
comm
andString
end timeout
end tell
end repeat
quit application "StuffIt Deluxe* $"
end open
=============
NOTE: The "$" character on the end of the application name is added
by KeyServer, an application we use for managing software licensing
and protection, to show that that application has been KeyServed.
I saved it as a Compiled Script and drag Zip files onto it to UnZip
them. Sometimes it works, sometimes it fails and when I bring the
Script Editor to the front it shows me this error message dialog box:
---------------------------------
| The 'Tran' verb requires a text |
| parameter with a key of 'name'. |
---------------------------------
When I look at StuffIt Deluxe's dictionary I find this entry for the
Translate command:
Translate: Accesses the translators
Translate ' '
name string -- Use this parameter to specify the translator
to be used
command string -- Use this parameter to specify the commands
to send the translator
Result: small integer -- A zero return indicates that the
file was translated properly.
Why does the example I found in StuffIt Deluxe use the word "match"
after the command Translate? It's not in the dictionary and I don't
see any reference to it in "The Tao of AppleScript". I'm not sure what
it does, I guess.
When I get the above mentioned error, if I go back to my script and
remove "match" and recompile, the Script Editor puts "match" back in.
If I then re-drop my Zip file the script will work again, but will
eventually fail again.
Thoughts anyone?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| Michael C. Dreimiller
_/_/_/_/_/ _/_/_/_/ | Systems Analyst
_/ _/ _/ _/ _/ | Vitro - a Tracor company
_/ _/ _/ _/_/_/ _/ _/ | 194 Howard Street
_/ _/ _/ _/ _/ | New London, CT 06320-5523
_/ _/ _/_/_/ _/_/_/_/ | Phone: 203-443-2465 x5218
| Fax: 203-447-4561
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Internet: dreimiller@vsdec.nl.nuwc.navy.mil
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
=========================================================================
Date: Tue, 24 May 1994 09:25:00 LCL
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mark Tucker <mark.tucker@HIS.COM>
Organization: Heller Information Services, Inc., Rockville MD
Subject: FILEMAKER PRO
I am trying to use Applescript to have a Filemaker Pro database find all of the
records modified on a certain day and then export the found records. The
problem is that if there are no records modified FileMaker puts up a dialog
asking if I want to cancel, continue or do a refind. Is there any way to avoid
this dialog? Or is there a way to have AppleScript activate the continue
button? Thanks.
=========================================================================
Date: Tue, 24 May 1994 09:24:48 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
Subject: Re: MountVolume OSAX
>I have this in my scripting additions folder, and I can't seem to find its
>origin. Is is part of the GTQ library? If so, it is not documented.
>
>In any case, how do you mount a volume without a zone? Giving a zone name of
>"" does not work.
At the risk of being totally wrong, I will hazard an answer:
If you have zones it may be: "Large University Zone:Big Mac"
If you don't have zones (no network) it would be: "*:Big Mac"
So, try "*" for the zone or maybe leave out the zone parameter?
-DM
Desmond K. Mullen - University of Minnesota, Office of Admissions
mulle009@maroon.tc.umn.edu - 612/625-0824
=========================================================================
Date: Tue, 24 May 1994 08:02:55 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: Re: telling an osax?
Oh wise and wonderful osax czar, Jon Pugh, thanks! Kee Nethery
_________________________________________________________________
Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
=========================================================================
Date: Tue, 24 May 1994 08:36:55 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Ray <daver@NETCOM.COM>
Subject: Re: StuffIt Deluxe script ??s
>When I get the above mentioned error, if I go back to my script and
>remove "match" and recompile, the Script Editor puts "match" back in.
>If I then re-drop my Zip file the script will work again, but will
>eventually fail again.
FWIW, I have exactly the same problem. The script won't compile even though
I know the synyax is correct. If I remove "match" and recompile, the word
"match" is put back in, and the script runs. But if I make *any* change
to the script and compile it again, I get the same error.
I ran into this problem with a client and had to remove all 'translate'
commands in order to remove this flakyness.
Any clues, Aladdin? (Leonard?)
-Dave
=========================================================================
Date: Tue, 24 May 1994 12:35:04 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Andy J. Williams" <Andy.J.Williams@DARTMOUTH.EDU>
Subject: Slowness
I have found that AppleScript is just too slow for many of the things I need
to do.
Examples:
I am using a scriptable mail program (BlitzMail, a local home-brew here at
Dartmouth which is, in every other way, an incredibly fast program). Any
script I write to control it, no matter how simple, is just too slow to be
very useful.
On our local MacHTTP server here we use scripts to generate the TidBITS pages
(simply generate the HTML page based on the contents of a given folder). This
slows the server down unbelievable.
Anyone else feel that AppleScript has too high an overhead?
-A
=========================================================================
Date: Tue, 24 May 1994 14:40:03 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Jon's Commands keys pressed with a droplet...
I've been hitting a strange snag trying to get the keys that are
being held down when a file is dropped onto a droplet. Can anyone tell
my why this doesn't work?
on open theFiles
set theKeys to (keys pressed)
display dialog theKeys
end open
As soon as the droplet tries to run I geta beep every second until I
release any keys that I was holding down. Is there a way to fix this?
-Hades
=========================================================================
Date: Tue, 24 May 1994 11:47:19 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Leonard Rosenthol <leonardr@NETCOM.COM>
Subject: Re: StuffIt Deluxe script ??s
>I saved it as a Compiled Script and drag Zip files onto it to UnZip
>them. Sometimes it works, sometimes it fails and when I bring the
>Script Editor to the front it shows me this error message dialog box:
>
I don't understand why it only works sometimes - it should either
work, or not...
>Why does the example I found in StuffIt Deluxe use the word "match"
>after the command Translate? It's not in the dictionary and I don't
>see any reference to it in "The Tao of AppleScript". I'm not sure what
>it does, I guess.
>
Long story that goes back about 2+ years to when I first added
Apple event/AppleScript support to StuffIt. At that time, AppleScript was
still in its infancy and the 'aete' and how it worked was in fluxed. As
such, our 'aete' reflects idiosyncracies of prototype AppleScripts that are
no longer true in the shipping versions. Since we haven't released a new
version since AS shipped, we still have those things in there. Future
StuffIt's won't have the problem!
Leonard
-----------------------------------------------------------------------------
Leonard Rosenthol Internet: leonardr@netcom.com
Director of Advanced Technology AppleLink: MACgician
Aladdin Systems, Inc. GEnie: MACgician
=========================================================================
Date: Tue, 24 May 1994 15:12:58 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: FILEMAKER PRO
In-Reply-To: <no.id> from "Mark Tucker" at May 24, 94 09:25:00 am
--Mark Tucker wrote:
>
>I am trying to use Applescript to have a Filemaker Pro database find all
>of the records modified on a certain day and then export the found
>records. The problem is that if there are no records modified FileMaker
>puts up a dialog asking if I want to cancel, continue or do a refind.
>Is there any way to avoid this dialog? Or is there a way to have
>AppleScript activate the continue button? Thanks.
Well, this depends on whether or not you are using a "show" command
from AppleScript, or you are using the "do script" command to run a FM
Pro script that actually does the find. If it's the latter, then there
is no way to have AppleScript get rid of the FM Pro dialog box. You only
solution to this is to use the "show" command and direct the find from
AppleScript. If you are already using the "show" command, then you will
need to use something like the following (you should also use this if
you are chaning over to the "show" command):
tell application "FileMaker Pro"
try
Show (every Record whose Cell "modified date" > "5/24/94")
Do Script "Export Records"
on error -- this means that there were no records found.
(* Do whatever is appropriate for not finding any records *)
end try
end tell
-Hades
=========================================================================
Date: Tue, 24 May 1994 13:14:11 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
Subject: AS-L: A Suggestion.
Hi guys. After having been on the list for two weeks, I must say that it's
been one of the more useful lists I've subscribed to. All the imput has
been great!
However....
I, like many of you, am a professional, working at an office. I subscribe
to roughly a dozen lists. Every other list I'm in has a naming convention,
so that incoming mail can be recognized and sorted. This list hasn't
adopted a naming convention for messages, so it just gets dumped into the
main message queue.
Take a few recent messages, for example. Subject titles like "FileMaker
Pro" or "Slowness" could refer to anything. There's no way to filter
these, short of opening them, reading them, and moving them manually. (A
little primitive, considering that we're all writing AppleScripts to
automate these kind of tasks.)
I humbly suggest that a naming convention be adopted for the list. My
suggestion is: Put AS-L (AppleScript-List) in all subject headers. This
is consistent with most other mailing lists, and will make mail-sorting
MUCH easier....
Kyle
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"I'd feel worse if I weren't under such heavy sedation..."
-David St. Hubbins, Spinal Tap
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
=========================================================================
Date: Tue, 24 May 1994 15:37:09 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Shawn Connelly <sconnelly@QM.PRUBANK.COM>
Subject: Net Volumes in Frontier
Net Volumes in Frontier
I would like to test for the availability of a server on the network
without neccessarily mounting the volume. Does anyone know of a way to do
this from Frontier?
Thanks.
------------------------------------------------------------------------
Shawn Connelly | Computers are useless. They
The Prudential Bank | can only give you answers.
Two Concourse Pkwy, #400 | - Pablo Picasso
Atlanta, GA 30328 |
Internet: shawn@prubank.com -or- shawn@cars.com; Phone: 404-604-7939
=========================================================================
Date: Tue, 24 May 1994 16:10:23 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Bob Snyder <snyderra@DUNX1.OCS.DREXEL.EDU>
Subject: Re: AS-L: A Suggestion.
In-Reply-To: <9405241914.AA08997@cc.dixie.edu.dixie.edu> from "Kyle Maxwell"
at May 24, 94 01:14:11 pm
Kyle Maxwell scribbles:
> I humbly suggest that a naming convention be adopted for the list. My
> suggestion is: Put AS-L (AppleScript-List) in all subject headers. This
> is consistent with most other mailing lists, and will make mail-sorting
> MUCH easier....
>
On the many, many lists I've been on, I've not seen a convention like
this adopted... I don't think it's necessary, given there are enough
other headers to sort/filter mail on, like "Sender:" Elm's filter,
procmail, and Eudora 2 can all deal with using the Sender: header.
I'd rather the Subject line not be used for this.
Bob
=========================================================================
Date: Tue, 24 May 1994 15:16:34 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tom Donovan <donovan@COVIS.NWU.EDU>
Subject: Re: AS-L: A Suggestion.
>Hi guys. After having been on the list for two weeks, I must say that it's
>been one of the more useful lists I've subscribed to. All the imput has
>been great!
>
>However....
>
>I, like many of you, am a professional, working at an office. I subscribe
>to roughly a dozen lists. Every other list I'm in has a naming convention,
>so that incoming mail can be recognized and sorted. This list hasn't
>adopted a naming convention for messages, so it just gets dumped into the
>main message queue.
>
>Take a few recent messages, for example. Subject titles like "FileMaker
>Pro" or "Slowness" could refer to anything. There's no way to filter
>these, short of opening them, reading them, and moving them manually. (A
>little primitive, considering that we're all writing AppleScripts to
>automate these kind of tasks.)
>
>I humbly suggest that a naming convention be adopted for the list. My
>suggestion is: Put AS-L (AppleScript-List) in all subject headers. This
>is consistent with most other mailing lists, and will make mail-sorting
>MUCH easier....
>
>Kyle
>
>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>"I'd feel worse if I weren't under such heavy sedation..."
>-David St. Hubbins, Spinal Tap
>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Kyle,
That sounds like a fine idea, but assuming something less than 100%
adherence to some naming convention ("AS-L:", "MacScript-L",
AppleScript-L"?), you can modify your sorting script to check one of the
header fields. At least in my mail, the "Reply-To", "Sender", and "To"
fields are consistent--the headers look like this:
>Date: Tue, 24 May 1994 13:14:11 -0600
>Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>
>Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>
>From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
>Subject: AS-L: A Suggestion.
>X-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>
>To: Multiple recipients of list MACSCRPT <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>
Maybe others on the list who are more experienced can tell why this would
*not* work, but it sure seems to me like it would do the trick.
--Tom
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Tom Donovan "Perhaps the most universal information trap is the...
System Administrator trap of forgetting what it's like not to know. The
CoVis Project minute we know something, we forget what it was like
Northwestern Univ. not to know it." --Richard S. Wurman
"Information Anxiety"
E-mail: donovan@covis.nwu.edu
(Check out the CoVis Web Server at URL: http://www.covis.nwu.edu/)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=========================================================================
Date: Tue, 24 May 1994 16:18:49 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: AS-L: A Suggestion.
In-Reply-To: <no.id> from "Kyle Maxwell" at May 24, 94 01:14:11 pm
--Kyle Maxwell wrote:
>
>I, like many of you, am a professional, working at an office. I subscribe
>to roughly a dozen lists. Every other list I'm in has a naming convention,
>so that incoming mail can be recognized and sorted. This list hasn't
>adopted a naming convention for messages, so it just gets dumped into the
>main message queue.
Well, if we weren't all friends and stuff I would simply say, "Get a
better email program." I have no problem sorting all of my MacScrpt-L
traffic to it's appropriate mailbox.
>Take a few recent messages, for example. Subject titles like "FileMaker
>Pro" or "Slowness" could refer to anything. There's no way to filter
>these, short of opening them, reading them, and moving them manually. (A
>little primitive, considering that we're all writing AppleScripts to
>automate these kind of tasks.)
This kind of thing happens when the scope of the mailing list is as
wide as this one. There is almost no limit to the number of relative
subjects that can be discussion on this list.
>I humbly suggest that a naming convention be adopted for the list. My
>suggestion is: Put AS-L (AppleScript-List) in all subject headers. This
>is consistent with most other mailing lists, and will make mail-sorting
>MUCH easier....
Ah... now we come to the problem. This is not the "AppleScript-List"
as you refer to it above. This mailing list covers all topics related to
scripting on the Mac. Specifically AppleScript, Frontier, QuicKeys, some
HyperCard, Frontmost/FaceSpan, all scriptable applications, and
scripting additions, and all kinds of other topics that are related to
scripting on the Mac. I certainly don't want to have to put a
"MacScrpt-L" in front of every message I send to this list, and I doubt
many others will either.
As a possible solution, you could have the list sent to you as a
daily digest. This would solve the problem of having lots of random
messages in your default mailbox. As long as you aren't doing a lot of
replying to posts, the digest format is probably one of the best ways to
receive a listserv list.
Of course, if you have a mail program that allows for sorting based
on more than just Subject, you wouldn't have this problem at all. ;->
-Hades
=========================================================================
Date: Tue, 24 May 1994 16:38:01 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Ted Goranson <goranson@ISI.EDU>
Subject: Re: AS-L: A Suggestion.
>I humbly suggest that a naming convention be adopted for the list. My
>suggestion is: Put AS-L (AppleScript-List) in all subject headers. This
>is consistent with most other mailing lists, and will make mail-sorting
>MUCH easier....
>
>Kyle
Really great idea! This is the only group of about a dozen to which I
subscribe that is so poorly headed. So my sorter doesn't work. This can be
fixed at the server level. But there are some things which posters could do
to make things better. If the message is about an app, please say so in the
header, so we can kill messages not of interest.
BTW, this is <not> an AS list! Some of us, possibly the ones who could
contribute a lot, are Frontier scripters. If the topic is cogent to that
superior environment, a user-added "frontier" in the header would probably
get better response. 'Cepting from that helpful maven, all-wet-Baxter, who
seems biscriptual.
---Ted
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
.....| Ted Goranson, Sirius-Beta | |
.....| 1976 Munden Pt, Va Beach VA 23457-1227 | ARoarABoaryAlice |
.....| 804/426-6704, Fax 804/721-0781 | |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=========================================================================
Date: Tue, 24 May 1994 14:41:08 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
Subject: Re: AS-L: A Suggestion.
>That sounds like a fine idea, but assuming something less than 100%
>adherence to some naming convention ("AS-L:", "MacScript-L",
>AppleScript-L"?), you can modify your sorting script to check one of the
>header fields. At least in my mail, the "Reply-To", "Sender", and "To"
>fields are consistent--the headers look like this:
>
>>Date: Tue, 24 May 1994 13:14:11 -0600
>>Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>
>>Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>
>>From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
>>Subject: AS-L: A Suggestion.
>>X-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>
>>To: Multiple recipients of list MACSCRPT <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>
>
>Maybe others on the list who are more experienced can tell why this would
>*not* work, but it sure seems to me like it would do the trick.
>
>--Tom
In Eudora 1.4.2, the sender field is always the name of the person that
sent the message. Eudora doesn't allow you to search by the "Reply-To"
field. Eudora's only searchable parameters are: Sender, Status, Size,
Date, and Subject. (You can only search incoming mail from a toplevel
folder)
Thus, if John Q. Public sends a message to the list, Eudora lists "John Q.
Eudora" in the sender field, not "Machintosh Scripting Systems."
I don't know WHY Eudora substitutes the senders name and address for the
distributing mail server. If anyone else knows why this happens, and how
to change it, I'd appreciate hearing about it...
Any suggestions from the group?
Kyle
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"I'd feel worse if I weren't under such heavy sedation..."
-David St. Hubbins, Spinal Tap
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
=========================================================================
Date: Tue, 24 May 1994 14:49:16 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
Subject: Re: AS-L: A Suggestion.
>Kyle Maxwell scribbles:
>
>> I humbly suggest that a naming convention be adopted for the list. My
>> suggestion is: Put AS-L (AppleScript-List) in all subject headers. This
>> is consistent with most other mailing lists, and will make mail-sorting
>> MUCH easier....
>>
>
>On the many, many lists I've been on, I've not seen a convention like
>this adopted... I don't think it's necessary, given there are enough
>other headers to sort/filter mail on, like "Sender:" Elm's filter,
>procmail, and Eudora 2 can all deal with using the Sender: header.
>I'd rather the Subject line not be used for this.
>
>Bob
Hmm. Your "many, many lists" DON'T use a naming convention, my "many, many
lists" DO use a naming convention. One of us spends too much time on
Usenet... <grin>
I ordered Eudora 2.0 two weeks ago, and it STILL hasn't arrived. If it
handles searches through headers, great. Forget I said anything. ;-) I
kind of figured Eudora 2.0 would fix this problem, but given the fact that
they apparently compile each copy to order, I haven't been able to test my
assumption. I've been using AppleScript to sort my mail.
Thanks for the info,
Kyle
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"I'd feel worse if I weren't under such heavy sedation..."
-David St. Hubbins, Spinal Tap
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
=========================================================================
Date: Tue, 24 May 1994 17:02:18 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Myers <dcmyers@ACCESS.DIGEX.NET>
Subject: Overhead of function calls in Frontier?
Has anybody ever done performance timings for various actions in
Frontier? I'd really like to know the overhead of looking up
an item in the Object Database versus doing a function call.
For example, suppose I define this table entry:
people.DCM.randomString = "This is a random string"
and use this entry in the following way:
msg(people.DCM.randomString + "...Yes, it is.")
Will that be faster than if I defined a function as follows:
on produceARandomString()
return ("This is a random string.")
and called it like this:
msg(produceARandomString() + "...Yes, it is")
I'd certainly expect the table lookup to be faster, but by how much?
Just curious. Thanks.
____________________________________________________
David C. Myers
dcmyers@access.digex.net
=========================================================================
Date: Tue, 24 May 1994 16:40:10 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Shawn Connelly <sconnelly@QM.PRUBANK.COM>
Subject: Importing in Frontier
Importing in Frontier
I'm writing an importer for Frontier and have been trying to get the
exported objects to import without the confirmation dialogs, and
displaying every imported object.
Does anyone have a technique or script that does this?
Thanks.
------------------------------------------------------------------------
Shawn Connelly | Computers are useless. They
The Prudential Bank | can only give you answers.
Two Concourse Pkwy, #400 | - Pablo Picasso
Atlanta, GA 30328 |
Internet: shawn@prubank.com -or- shawn@cars.com; Phone: 404-604-7939
=========================================================================
Date: Tue, 24 May 1994 14:22:18 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Leonard Rosenthol <leonardr@NETCOM.COM>
Subject: Re: Slowness
>I have found that AppleScript is just too slow for many of the things I need
>to do.
>
I have a feeling it is NOT AppleScript, but instead is two things -
one, the application in question and two the System Software you are using.
If you run an AppleScript that does not communicate with applications,
you will find that it is VERY fast as far as a scripting language goes
(though UserTalk is faster - especially the native version ;). But as
soon as the Process Manager and other people's code come into play,
anything is fair game...
The PM problem will go away in the next major System Software
version, but applications can always be a bottleneck...
Leonard
-----------------------------------------------------------------------------
Leonard Rosenthol Internet: leonardr@netcom.com
Director of Advanced Technology AppleLink: MACgician
Aladdin Systems, Inc. GEnie: MACgician
=========================================================================
Date: Tue, 24 May 1994 17:20:39 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: AS-L: A Suggestion.
In-Reply-To: <no.id> from "Kyle Maxwell" at May 24, 94 02:49:16 pm
--Kyle Maxwell wrote:
>
>Hmm. Your "many, many lists" DON'T use a naming convention, my "many, many
>lists" DO use a naming convention. One of us spends too much time on
>Usenet... <grin>
While I have no doubt that there are many lists that do use Subject
line conventions none of the lists that I currently belong to: Mac-L,
MacPb-L, MacScrpt, FmPro-L, Newton-L, MacNet-L, MacAppli, MacHrdwr,
MacSystm, QuicKeys, Global Village, 4D, and PowerPC-L make use of any
standard naming convention.
>I ordered Eudora 2.0 two weeks ago, and it STILL hasn't arrived. If it
>handles searches through headers, great. Forget I said anything. ;-) I
>kind of figured Eudora 2.0 would fix this problem, but given the fact that
>they apparently compile each copy to order, I haven't been able to test my
>assumption. I've been using AppleScript to sort my mail.
I don't know the capabilites of Eudora 2.0 vs. 1.4.3 but if either
of them allow you to look at the To: field your problem might be solved
already. All listservs show the To: field as :
To: Multiple recipients of list MACSCRPT <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>
This is the field that I use in elm to sort all of my listserv
mailing lists.
-Hades
=========================================================================
Date: Tue, 24 May 1994 17:20:46 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Shaddar@AOL.COM
Subject: Re: Slowness
>I have found that AppleScript is just too slow for many of the things I need
>to do.
>Examples:
>I am using a scriptable mail program (BlitzMail, a local home-brew here at
>Dartmouth which is, in every other way, an incredibly fast program). Any
>script I write to control it, no matter how simple, is just too slow to be
>very useful.
>On our local MacHTTP server here we use scripts to generate the TidBITS
pages
>(simply generate the HTML page based on the contents of a given folder).
This
>slows the server down unbelievable.
>Anyone else feel that AppleScript has too high an overhead?
Yes, I've written a few scripts which were very time consuming to run. For
example, I had a script which searched text to replace certain common items,
and found that I could do it almost as fast by hand. Encryption using STE is
rediculous. I tried to write a simple drag-and-drip encryption program but
it took *forever*. I wonder if this is because apple events happen less
frequently or because of timeouts and application responses. Maybe ignoring
application responses would speed it up if it didn't screw up the code. Does
anyone know a way to speed AS up?
~Josh~
=========================================================================
Date: Tue, 24 May 1994 15:41:14 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Greg Kearney <gkearney@CSN.ORG>
Subject: Sendign a kill event
Can someone out there tell me how to send a kill event to a program which
is not scriptable. I need to use kill over quit because I don't want to
see the save document warning which require someone to responds. I need
either a small scriptable utilities which I can use to send a kill or
information on how to send the kill event directly to the application.
I'm also looking for an ASOX that will send keyboard like events something
like sending a return key
Thanks for the help.
Greg Kearney
------------------------------------------------------------------------------
gkearney@csn.org Gregory Kearney
(307) 266-0570 voice Howard Publications Newspaper Group
(307) 266-0501 fax 170 Star Lane P.O. Box 80
Casper, Wyoming 82602
------------------------------------------------------------------------------
=========================================================================
Date: Tue, 24 May 1994 16:36:33 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
Subject: Re: AS-L: A Suggestion.
>Kyle Maxwell scribbles:
>
>> I humbly suggest that a naming convention be adopted for the list. My
>> suggestion is: Put AS-L (AppleScript-List) in all subject headers. This
>> is consistent with most other mailing lists, and will make mail-sorting
>> MUCH easier....
>>
>
>On the many, many lists I've been on, I've not seen a convention like
>this adopted... I don't think it's necessary, given there are enough
>other headers to sort/filter mail on, like "Sender:" Elm's filter,
>procmail, and Eudora 2 can all deal with using the Sender: header.
>I'd rather the Subject line not be used for this.
>
>Bob
I second Bob's motion - I have Eudora sort my mail by sender. MACSCRPT
messages are put in my AppleScript mailbox.
I think it's best to sort by the most dependable variable - MACSCRPT
messages are always going to have "Macintosh Scripting Systems
<MACSCRPT@blah.blah>" as the sender (or whatever it is on your system - it
doesn't change).
-DM
Desmond K. Mullen - University of Minnesota, Office of Admissions
mulle009@maroon.tc.umn.edu - 612/625-0824 - Minneapolis, Minnesota, USA
=========================================================================
Date: Tue, 24 May 1994 16:35:37 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tom Donovan <donovan@COVIS.NWU.EDU>
Subject: Re: AS-L: A Suggestion.
>
>In Eudora 1.4.2, the sender field is always the name of the person that
>sent the message. Eudora doesn't allow you to search by the "Reply-To"
>field. Eudora's only searchable parameters are: Sender, Status, Size,
>Date, and Subject. (You can only search incoming mail from a toplevel
>folder)
>
>Thus, if John Q. Public sends a message to the list, Eudora lists "John Q.
>Eudora" in the sender field, not "Machintosh Scripting Systems."
>
>I don't know WHY Eudora substitutes the senders name and address for the
>distributing mail server. If anyone else knows why this happens, and how
>to change it, I'd appreciate hearing about it...
>
>Any suggestions from the group?
>
>Kyle
>
>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>"I'd feel worse if I weren't under such heavy sedation..."
>-David St. Hubbins, Spinal Tap
>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Kyle,
While you are correct about the searchable parameters, it is also possible
to look at the contents of particular header fields by name using the
following syntax:
tell app "Eudora1.4.2"
get field "Sender" of message 1 of mailbox "in" of mail folder ""
end tell
For example, if the message in question is from the MacScripting list, the
statement above will return the string:
"Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>"
On the other hand the statement, 'get Sender of message....' returns the
contents of the "From" field (minus the e-mail address). Go figure.
This same syntax seems to work with any *existing* field in the header--if
the field does not exist, AppleScript returns an error.
--Tom
=========================================================================
Date: Tue, 24 May 1994 17:42:49 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Myers <dcmyers@ACCESS.DIGEX.NET>
Subject: Re: Slowness
"Andy J. Williams" <Andy.J.Williams@DARTMOUTH.EDU> wrote:
>I have found that AppleScript is just too slow for many of the things I need
>to do.
>
[...snip...]
>
>Anyone else feel that AppleScript has too high an overhead?
>
>-A
By slow, do you mean that the AppleScript interpreter is slow, or the
interaction of multiple programs over the appleEvent interface is slow?
I have found the latter to be true much more so than the former. Try
this: use the grep osax available on gaea (can't remember the author's
name; sorry!) to parse a text file. Feed the grepper one line of text
from the file at a time. Give yourself lots of time...The resulting
crawl is not the fault of the grep osax author, who in all wrote a
very useful little utility. Rather, you just can't use the current
appleEvent interface for passing large quantities of data between programs.
It just doesn't have the bandwidth.
If this listServ has an archiving function, you can check out a thread
on AppleScript speed that went on a month or so ago. Someone mentioned
refinements to the Process Manager that will ship with Sys 7.5 that should
speed things up a bit.
-David.
____________________________________________________
David C. Myers
dcmyers@access.digex.net
=========================================================================
Date: Tue, 24 May 1994 16:47:12 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
Subject: Re: Eudora sorting
>In Eudora 1.4.2, the sender field is always the name of the person that
>sent the message. Eudora doesn't allow you to search by the "Reply-To"
>field. Eudora's only searchable parameters are: Sender, Status, Size,
>Date, and Subject. (You can only search incoming mail from a toplevel
>folder)
This is not true - you can identify a whole slew of things about ANY message
in ANY folder.
Here's a snippet from my Eudora sorting script. I sort a bunch of mail based
on a lot of different things, so I have it grab all this info on new messages
after they've been fetched and then it sorts them accordingly.
-------------- some of a script ---------------
set theSender to field "From" of message x of mailbox "In" of mail folder ""
set theShortSender to Sender of message x of mailbox "In" of mail folder ""
set theRecipient to field "To" of message x of mailbox "In" of mail folder ""
set theSubject to Subject of message x of mailbox "In" of mail folder ""
try -- I don't remember why, but this is troublesome sometimes so I use "try"
set theReply to field "Reply" of message x of mailbox "In" of mail folder ""
on error
set theReply to ""
end try
if theReply contains "MACSCRPT" then
(etc., etc.)
-------------- some of a script ---------------
-DM
Desmond K. Mullen - University of Minnesota, Office of Admissions
mulle009@maroon.tc.umn.edu - 612/625-0824 - Minneapolis, Minnesota, USA
=========================================================================
Date: Tue, 24 May 1994 17:02:04 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
Subject: My Stupid Idea...
Well, Tom made me see the errors of my ways as far as sorting Eudora mail...
I hereby retract my suggestion about a naming convention.
Much Thanks to Tom, who made my life a Zillion times easier!
Kyle
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"I'd feel worse if I weren't under such heavy sedation..."
-David St. Hubbins, Spinal Tap
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
=========================================================================
Date: Tue, 24 May 1994 17:43:23 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
Subject: AppleScript: My Stupid Idea Part II
Hmmm. Tom's idea is great except for one thing. Once the script hits a
message sent on a peer to peer basis, it returns an error. (As Tom notes in
his last sentance.) I can't find a way around the error. Thus, the script
works right up until it hits a message NOT sent from a list server, then
the whole script fails. Since regular eMail is always scattered in with
List mail, sorting based on this method isn't very practical...
Any comments?
------------------------------
>While you are correct about the searchable parameters, it is also possible
>to look at the contents of particular header fields by name using the
>following syntax:
>
>tell app "Eudora1.4.2"
> get field "Sender" of message 1 of mailbox "in" of mail folder ""
>end tell
>
>For example, if the message in question is from the MacScripting list, the
>statement above will return the string:
>
> "Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>"
>
>On the other hand the statement, 'get Sender of message....' returns the
>contents of the "From" field (minus the e-mail address). Go figure.
>
>This same syntax seems to work with any *existing* field in the header--if
>the field does not exist, AppleScript returns an error.
>
>--Tom
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"I'd feel worse if I weren't under such heavy sedation..."
-David St. Hubbins, Spinal Tap
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
=========================================================================
Date: Tue, 24 May 1994 17:57:43 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
Subject: Re: AS-L: A Suggestion.
Well, I finally got it through my thick head. Here's what I had to do:
try
set sendHolder to field "Sender" of message i of mailbox inBox of mail
folder default
on error
set sendHolder to ""
end try
This allows peer to peer messages.
Thanks!
Kyle
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"I'd feel worse if I weren't under such heavy sedation..."
-David St. Hubbins, Spinal Tap
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
=========================================================================
Date: Tue, 24 May 1994 19:41:39 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: Eudora AS questions
1. The following AppleScript does not work, any idea what AppleScript is used
to delete a message in the In Box that has not been marked as read?
----------
property defaults : ""
property inBox : "In"
property i : {1}
delete message i of mailbox inBox of mail folder defaults
----------
2. The following AppleScripts do not return the internet address of the person
who sent the message. Field "From:" returns the entire contents of the from
field and that does work as a return address but it includes all the extra
text identifying the sender such as for me, my name and phone number.
Sender returns only the stuff in the From field that I do not want. What I
desire is the stuff in the From field that is not what you return as
Sender. What would be the proper form for acquiring just the domain style
return address of the sender?
----------
set x to field "From:" of message i of mailbox inBox of mail folder defaults
set x to Sender of message i of mailbox inBox of mail folder defaults
----------
3. The following AppleScript returns the message body but it seems kludgy to
me. Is there a more precise form for asking for the message body other than
asking for field empty?
----------
set x to field "" of message i of mailbox inBox of mail folder defaults
----------
4. I was unable to locate more than just a small sample of Eudora sample
AppleScripts such as "Request Eudora Info", "Eudora Notify Controller", and
"SendScript@Eudora" on the ftp server at qualcomm. Any other sources for
eudora examples?
Thanks all, this mailing list is a very big help.
Kee Nethery
_________________________________________________________________
Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
=========================================================================
Date: Tue, 24 May 1994 19:49:33 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: Re: AppleScript: My Stupid Idea Part II
>Hmmm. Tom's idea is great except for one thing. Once the script hits a
>message sent on a peer to peer basis, it returns an error. (As Tom notes in
>his last sentance.) I can't find a way around the error. Thus, the script
>works right up until it hits a message NOT sent from a list server, then
>the whole script fails. Since regular eMail is always scattered in with
>List mail, sorting based on this method isn't very practical...
>
>Any comments?
>
property d1 : ""
property inBox : "In"
property ms1 : "Macintosh Scripting Systems <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>"
property messageCount : {}
on run
tell application "Eudora"
activate
set messageCount to count message of mailbox inBox of mail folder d1
end tell
-- parse mail in reverse order so that message numbering does not
-- change as you deal with messages
repeat with i from messageCount to 1 by -1
tell application "Eudora"
activate
try
set h1 to field "Sender" of message i of mailbox inBox of mail folder d1
if (h1 contains ms1) then
-- do whatever you wish to the message from MacScripting
end if
end repeat
end run
Kee Nethery
_________________________________________________________________
Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
=========================================================================
Date: Tue, 24 May 1994 20:06:36 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: AppleScript: My Stupid Idea Part II
>Hmmm. Tom's idea is great except for one thing. Once the script hits a
>message sent on a peer to peer basis, it returns an error. (As Tom notes in
>his last sentance.) I can't find a way around the error. Thus, the script
>works right up until it hits a message NOT sent from a list server, then
>the whole script fails. Since regular eMail is always scattered in with
>List mail, sorting based on this method isn't very practical...
>
>Any comments?
Handling errors is the realm of the try ... on error ... end construct in
AppleScript.
tell application "Eudoraxxx"
...
try
get field "Sender" of message 1 of mailbox "in" of mail folder ""
on error -- some parameters are available here...haven't checked Eudora's
--do something about message 1 which does not have a "Sender" header
end try
end tell
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Wed, 25 May 1994 08:20:58 +0100
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Johan Solve <johan.solve@ITN.HH.SE>
Subject: Re: FILEMAKER PRO
> --Mark Tucker wrote:
> >
> >I am trying to use Applescript to have a Filemaker Pro database find all
> >of the records modified on a certain day and then export the found
> >records. The problem is that if there are no records modified FileMaker
> >puts up a dialog asking if I want to cancel, continue or do a refind.
> >Is there any way to avoid this dialog? Or is there a way to have
> >AppleScript activate the continue button? Thanks.
>
> Well, this depends on whether or not you are using a "show" command
> from AppleScript, or you are using the "do script" command to run a FM
> Pro script that actually does the find. If it's the latter, then there
> is no way to have AppleScript get rid of the FM Pro dialog box.
No, but you can have the FileMaker script avoid the dialog, by adding a
second search record in the script and have that second script search for a
dummy record that is empty except for a unique dummy value (such as xxx, or
in your case a dummy date, such as 1/1/1) in the search field.
This way, the search will never fail. Now have AppleScript look in the
database to see if there are any valid (non-dummy) records among the found
and if that is the case do the export.
This solution leaves you with an extra record with the dummy value in the
database, which perhaps isn't suitable.
_______________________________________________________________________
"
JOHAN SOLVE Department of Science and Technology
<johan.solve@itn.hh.se> Halmstad University, Sweden
=========================================================================
Date: Wed, 25 May 1994 18:30:57 +1200
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Norris <michael.norris@STONEBOW.OTAGO.AC.NZ>
Subject: The GRRREAT TCP-IP Scripting Addition
Hi There,
This is an open request to anybody who has used the TCP-IP Scripting
Addition, and especially to Atul Butte (who wrote the thing).
It's great, but if there's one feature I'd love to see added...
Is there any way to check if a host name exists in a shorter space of time
than the several minutes it takes (while hanging your computer) on a tcp
connect command? Ie a tcp check host command, which would return a boolean
if there is a host of that name.
Cheers,
Michael Norris,
CAL Consultant,
University of Otago,
PO Box 56,
Dunedin,
New Zealand.
---------------------
Ph:(03) 479-7705
E-Mail: michael.norris@stonebow.otago.ac.nz
=========================================================================
Date: Wed, 25 May 1994 15:53:21 +0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Craig Richmond <craig@ECEL.UWA.EDU.AU>
Subject: Re: The GRRREAT TCP-IP Scripting Addition
>Is there any way to check if a host name exists in a shorter space of time
>than the several minutes it takes (while hanging your computer) on a tcp
>connect command? Ie a tcp check host command, which would return a boolean
>if there is a host of that name.
The problem here is that the DNS requests can actually take a couple of
minutes to get a response. Until that time, your local name server does
not know if there is a host of that name or not.
What you need is an external program that will do the DNS request for you
asynchronously (I don't program MacTCP or much at all for that matter and
don't know if this is possible or not) and then you can ask it for a name.
It will then have to return.
a) Yes and here are the details.
b) No it definitely does not exist.
c) Not sure, check again soon.
Depending on what was happening with the particular name in question. The
program would then have to expire the data out of its cache as time passed
etc etc.
Craig
--
Craig Richmond, Computer Officer, ECEL Computing Services +61 9 380 1405
The University of Western Australia or 380 3860 Email for FAX Number
craig@ecel.uwa.edu.au Dvorak Keyboards RULE! "Messes are only acceptable
if users make them. Applications aren't allowed this freedom" I.M.VI 2-4
=========================================================================
Date: Tue, 24 May 1994 16:30:06 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Kalkwarf <kalkwarf@NETCOM.COM>
Subject: Tao script sample help
Hi gang!
I've read the FAQ, read the list, and even asked my friends...
In BMUG's Tao of AppleScript book there is a sample script on pp94-95 that
looks like:
>copy (choose file) to sourceFile
>copy (count resources of type "snd " in sourceFile) to resCount
>copy (get name of resource number 1 of type "snd " in sourceFile) to
resName
>tell application "Finder Liaison 1.1"
> create file resName in Folder "Sounds" in Disk "Zot 7.1"
> replacing yes
> Set Type of File resName in Folder "sounds" in Disk "Zot 7.1" To "sfil"
> Set Creator of File resName in Folder "sounds" in Disk "Zot 7.1" To
"movr"
>end tell
I can't get it to run. The first problem was the "...in Folder..." stuff.
The dictionary for Finder Liaison shows the syntax to be "...of
Folder...". When I changed those lines and ran the script again, I got an
error message "Expected EOL, etc. but found application constant of
consideration.".
So I deleted the line "replacing yes". The new error message reads "Finder
Liaison 1.1 got an error. Can't make some data into the expected type."
I'm using AppleScript 1.1, and I've tried Liaison 1.0 and 1.1. The disk
exists, and the folder exists at the root level of Zot.
I must be doing something mind-numbingly stupid here. Can anyone help me?
Steve
=========================================================================
Date: Wed, 25 May 1994 13:21:27 +0100
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Johan Solve <johan.solve@ITN.HH.SE>
Subject: Re: FILEMAKER PRO
> No, but you can have the FileMaker script avoid the dialog, by adding a
second
> search record in the script and have that second script search for a dummy
^^^^^^
> record that is empty except for a unique dummy value (such as xxx, or in
> your case a dummy date, such as 1/1/1) in the search field.
Sorry, my fingers slipped. Replace "script" above with "record".
_______________________________________________________________________
"
JOHAN SOLVE Department of Science and Technology
<johan.solve@itn.hh.se> Halmstad University, Sweden
=========================================================================
Date: Wed, 25 May 1994 09:27:53 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Eudora AS questions
In-Reply-To: <no.id> from "Kee Nethery +1 510 843 6140" at May 24,
94 07:41:39 pm
Well, I'm not a Eudora scripter but I do know a little about it...
--Kee Nethery wrote:
>
>What I desire is the stuff in the From field that is not what you return
>as Sender. What would be the proper form for acquiring just the domain
>style return address of the sender?
>----------
>set x to field "From:" of message i of mailbox inBox of mail folder defaults
>set x to Sender of message i of mailbox inBox of mail folder defaults
>----------
Well, it's sort of supposed to return the entire contents of the
field. However, there is a fairly simple way to find just the email
address. Try this:
set xList to words of x
repeat with i from 1 to count xList
if item i of xList = "@" then exit repeat
end repeat
set xReturn to (item (i-1) of xList) & "@" & (item (i+1) of xList)
>3. The following AppleScript returns the message body but it seems kludgy to
>me. Is there a more precise form for asking for the message body other than
>asking for field empty?
>
>----------
>set x to field "" of message i of mailbox inBox of mail folder defaults
>----------
From what I've seen from other's on this list who work with Eudora
more than I do, this is the way you are supposed to get the body of a
message.
>4. I was unable to locate more than just a small sample of Eudora sample
>AppleScripts such as "Request Eudora Info", "Eudora Notify Controller", and
>"SendScript@Eudora" on the ftp server at qualcomm. Any other sources for
>eudora examples?
Have you looked in ftp://gaea.kgs.ukans.edu/applescript/scripts? I
think there might be a couple in there that are Eudora related.
-Hades
=========================================================================
Date: Wed, 25 May 1994 09:32:33 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Tao script sample help
In-Reply-To: <no.id> from "Steve Kalkwarf" at May 24, 94 04:30:06 pm
--Steve Kalkwarf wrote:
>
>>copy (choose file) to sourceFile
>>copy (count resources of type "snd " in sourceFile) to resCount
>>copy (get name of resource number 1 of type "snd " in sourceFile) to
>resName
>>tell application "Finder Liaison 1.1"
>> create file resName in Folder "Sounds" in Disk "Zot 7.1"
>> replacing yes
>> Set Type of File resName in Folder "sounds" in Disk "Zot 7.1" To "sfil"
>> Set Creator of File resName in Folder "sounds" in Disk "Zot 7.1" To
>"movr"
>>end tell
Have you tried using direct file references? By this I mean
replacing the `file resName in Folder "Sounds" in Disk "Zot 7.1"' with
`file "Zot 7.1:Sounds:" & resName' (without the single quotes). Whenever
I'm dealing with the Finder I use this style of file referencing
whenever I can. I like to think it works better, even though it probably
doesn't for me since I'm using the Scriptable Finder.
=========================================================================
Date: Wed, 25 May 1994 07:01:16 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: Re: Eudora in gaea.kgs.ukans.edu
>>4. I was unable to locate more than just a small sample of Eudora sample
>>AppleScripts such as "Request Eudora Info", "Eudora Notify Controller", and
>>"SendScript@Eudora" on the ftp server at qualcomm. Any other sources for
>>eudora examples?
>
> Have you looked in ftp://gaea.kgs.ukans.edu/applescript/scripts? I
>think there might be a couple in there that are Eudora related.
>
There seems to be only one Eudora Script in the bunch. Am I incorrect?
CanvasDemoScripts
DateConvert
FileMaker_&_AppleScript
FileMover1.0....
FinderScriptin...
FindScriptable...
GraphSearch.sit
Import_to_Pa...
LEVEL6Scripts...
MacProjectLib...
MattsScripts...
NUDSamples.hqx
PARSE.sit.hqx
ProcessFolder...
QuarkScript...
rebuild-project...
ripem-mac-ap... requires RIPEM to open
Script_Essential...
sendnewsscript...
sitcomm-login...
think6applescr...
TrashOldMess... Eudora related
Kee Nethery
_________________________________________________________________
Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
=========================================================================
Date: Wed, 25 May 1994 09:13:20 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Eudora in gaea.kgs.ukans.edu
In-Reply-To: Your message of "Wed, 25 May 94 07:01:16 -0900"
>>>4. I was unable to locate more than just a small sample of Eudora sample
>>>AppleScripts such as "Request Eudora Info", "Eudora Notify Controller", and
>>>"SendScript@Eudora" on the ftp server at qualcomm. Any other sources for
>>>eudora examples?
>>
>> Have you looked in ftp://gaea.kgs.ukans.edu/applescript/scripts? I
>>think there might be a couple in there that are Eudora related.
>>
>
>There seems to be only one Eudora Script in the bunch. Am I incorrect?
No, that's probably right. You'd have better luck getting the digests from
ftp://gaea.kgs.ukans.edu/applescript/docs/digests/
and scanning them for Eudora references. I seem to recall that there are
several scripts in them that I have yanked out and placed in the scripts
directory.
pf
=========================================================================
Date: Wed, 25 May 1994 10:14:38 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Edward M. Lutz, Jr" <elutz@TSO.UC.EDU>
Subject: Re: AS-L: A Suggestion.
>As a possible solution, you could have the list sent to you as a daily
>digest. This would solve the problem of having lots of random messages
>in your default mailbox. As long as you aren't doing a lot of replying
>to posts, the digest format is probably one of the best ways to receive
>a listserv list.
At the stage I'm at in picking up AppleScript, a digest would make a whole lot
more sense for me. How does one go about receiving the list as a digest as
opposed to individual messages?
Eddie
---------------------------------------------------------------------
Edward M. Lutz, Jr. Internet: elutz@tso.uc.edu
Exodus Software AppleLink: EXODUS
(513) 522-0011
(513) 522-3958 FAX
=========================================================================
Date: Wed, 25 May 1994 10:21:36 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Colin Enger <colin@ANAMORPHOSIS.USRA.EDU>
Subject: Eudora Won't Quit
I've just started scripting Eudora and I can't get the required suite commands
"Quit" or "Quit Application" to work.
Here's the code I've tried:
(1)
tell application "Eudora 1.4.2"
quit
end tell
(2)
quit application "Eudora 1.4.2"
Am I doing something radically wrong here?
Colin Enger - MacVantages Consulting
** Business software and training solutions for the Macintosh **
703-739-2671
=========================================================================
Date: Wed, 25 May 1994 10:29:33 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: AS-L: A Suggestion.
In-Reply-To: <no.id> from "Edward M. Lutz, Jr" at May 25, 94 10:14:38 am
--Edward M. Lutz, Jr wrote:
>
>At the stage I'm at in picking up AppleScript, a digest would make a whole lot
>more sense for me. How does one go about receiving the list as a digest as
>opposed to individual messages?
Send mail to listserv@dartmouth.edu, leave the subject line blank
(if you can't do this, any subject will be ignored). Have only one line
in the body of the message that reads: set macscrpt digest
-Hades
=========================================================================
Date: Wed, 25 May 1994 09:04:41 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
Subject: Re: Eudora AS questions
>2. The following AppleScripts do not return the internet address of the person
>who sent the message. Field "From:" returns the entire contents of the from
>field and that does work as a return address but it includes all the extra
>text identifying the sender such as for me, my name and phone number.
>Sender returns only the stuff in the From field that I do not want. What I
>desire is the stuff in the From field that is not what you return as
>Sender. What would be the proper form for acquiring just the domain style
>return address of the sender?
>
>----------
>set x to field "From:" of message i of mailbox inBox of mail folder defaults
>set x to Sender of message i of mailbox inBox of mail folder defaults
>----------
Kee, use
set x to Sender of message i of mailbox inBox of mail folder default
This will return just the person's address.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"I'd feel worse if I weren't under such heavy sedation..."
-David St. Hubbins, Spinal Tap
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
=========================================================================
Date: Wed, 25 May 1994 11:14:25 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Brown <dlb1@SEQUOIA.LLE.ROCHESTER.EDU>
Subject: where is grep?
Someone mentioned there is a grep oxax. What is the name of the file on
gaea which contains it?
--Dave
=========================================================================
Date: Wed, 25 May 1994 10:24:54 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: where is grep?
In-Reply-To: Your message of "Wed, 25 May 94 11:14:25 EDT"
Dave,
>Someone mentioned there is a grep oxax. What is the name of the file on
>gaea which contains it?
You'll find it in the ScriptTools collection of osaxen. It's in
ftp://gaea.kgs.ukans.edu/applescript/osaxen/ScriptTools1.3.sit.hqx
pf
=========================================================================
Date: Wed, 25 May 1994 08:35:59 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mike Cohen <isis@NETCOM.COM>
Subject: Re: Slowness
At 2:22 PM 5/24/94 -0800, Leonard Rosenthol wrote:
>>I have found that AppleScript is just too slow for many of the things I need
>>to do.
>>
> I have a feeling it is NOT AppleScript, but instead is two things -
>one, the application in question and two the System Software you are using.
>If you run an AppleScript that does not communicate with applications,
>you will find that it is VERY fast as far as a scripting language goes
>(though UserTalk is faster - especially the native version ;). But as
>soon as the Process Manager and other people's code come into play,
>anything is fair game...
>
When running a script from my own application (I'm currently writing my
second attachable app), I find that there's a noticable delay the first
time as the scripting component gets loaded. On subsequent calls, the
script runs almost as quickly as built-in commands since all AppleEvents
are sent by the application to itself, which bypasses context switching.
_______________________________________________________________
Mike Cohen | ISIS International
(818) 788-4747 Voice | isis@netcom.com | ALink: D6734
(818) 501-0653 Fax | NewtonMail, eWorld: MikeC | AOL: MikeC20
Home Page: file://netcom3.netcom.com/pub/isis/home.html
=========================================================================
Date: Wed, 25 May 1994 10:50:36 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: new scripts on gaea
Paul Farrah has contributed some new scripts for gaea. You'll find them in
ftp://gaea.kgs.ukans.edu/applescript/scripts/Script_Essentials.hqx
Here's his description of the scripts.
The Script Essentials
Version 1.0
(C) Copyright 1994 by Paul Farrah.
The Script Essentials is a collection of Shareware scripts designed to make
writing and debugging AppleScripts easier. The Script Essentials includes:
MakeString
----------
Makes records into strings:
{x:1, y:2} --> "{x:1, y:2}"
Works great with lists too:
{1, 2, 3, 4} --> "{1, 2, 3, 4}"
MakeString converts nearly anything to string so you can display it in a
dialog box.
PropLabels
----------
Returns the property labels of a record as a list of strings:
{name:"Scriptable Text Editor", version: 1.1} --> {"name", "version"}
=========================================================================
Date: Wed, 25 May 1994 08:56:25 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Kalkwarf <kalkwarf@NETCOM.COM>
Subject: Re: Tao script sample help
>--Steve Kalkwarf wrote:
>>
>>>copy (choose file) to sourceFile
>>>copy (count resources of type "snd " in sourceFile) to resCount
>>>copy (get name of resource number 1 of type "snd " in sourceFile) to
>>resName
>>>tell application "Finder Liaison 1.1"
>>> create file resName in Folder "Sounds" in Disk "Zot 7.1"
>>> replacing yes
>>> Set Type of File resName in Folder "sounds" in Disk "Zot 7.1" To "sfil"
>>> Set Creator of File resName in Folder "sounds" in Disk "Zot 7.1" To
>>"movr"
>>>end tell
>
> Have you tried using direct file references? By this I mean
>replacing the `file resName in Folder "Sounds" in Disk "Zot 7.1"' with
>`file "Zot 7.1:Sounds:" & resName' (without the single quotes).
I hadn't before, but I just now tried. I still get an error "Expected EOL,
etc. but found application constant or consideration." with the word "yes"
hilited in my script.
I think I'd just skip this particular script and go on, but the rest of the
book builds on this fragment. Sigh....
Steve
=========================================================================
Date: Wed, 25 May 1994 09:19:42 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Doug Baron <userland@NETCOM.COM>
Subject: Re: Net Volumes in Frontier
> Net Volumes in Frontier
>I would like to test for the availability of a server on the network
>without neccessarily mounting the volume. Does anyone know of a way to do
>this from Frontier?
>
>Thanks.
>
> ------------------------------------------------------------------------
> Shawn Connelly | Computers are useless. They
> The Prudential Bank | can only give you answers.
> Two Concourse Pkwy, #400 | - Pablo Picasso
> Atlanta, GA 30328 |
> Internet: shawn@prubank.com -or- shawn@cars.com; Phone: 404-604-7939
Simple: just test for the volume you want, then try ot mount it if it's not
there:
if not file.exists ("servervol:")
try
file.mountServerVolume ("*:servername:servervol", user, pswd)
else
<< handle failure to mount volume here
Doug
=========================================================================
Date: Wed, 25 May 1994 10:04:07 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Lewis <lewis@NETCOM.COM>
Subject: Frontier won't load system scrap
Hi,
I was trying to write a simple FinderMenu script which would put the path
to the selected item on the clipboard. I had this as the menu script:
copyPathToClipboard (FinderMenu.getSelectionList ())
and (without all the error control) this in copyPathToClipboard:
on copyPathToClipboard (selectionList)
Frontier.bringToFront () =ABso I can do the next step
clipboard.putValue (string (selectionList[1])) =ABI've verified this
Finder.bringToFront ()
At this point, the Finder's clipboard will remain unchanged. I verified the
contents of the clipboard in Frontier by putting up a dialog.alert, which
showed the correct thing. By the way, using appMenu.select ("Finder")
instead of Finder.bringToFront () makes no difference. Frontier doesn't
seem to be putting its clipboard contents on the system scrap before doing
the switch. How can I force this? Thanks.
David
David Lewis Seagate Technology (408) 439-2374 lewis@netcom.com
=========================================================================
Date: Wed, 25 May 1994 11:56:44 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Vinod Kurup <vvkurup@STUDENTS.WISC.EDU>
Subject: Tao script sample help
>Hi gang!
Howdy!
>In BMUG's Tao of AppleScript book there is a sample script on pp94-95 that
>looks like:
>
>>copy (choose file) to sourceFile
>>copy (count resources of type "snd " in sourceFile) to resCount
>>copy (get name of resource number 1 of type "snd " in sourceFile) to
>resName
>>tell application "Finder Liaison 1.1"
>> create file resName in Folder "Sounds" in Disk "Zot 7.1"
>> replacing yes
>> Set Type of File resName in Folder "sounds" in Disk "Zot 7.1" To "sfil"
>> Set Creator of File resName in Folder "sounds" in Disk "Zot 7.1" To
>"movr"
>>end tell
I think there are 2 problems:
1) "replacing yes" should be on the end of the previous line, not on a separate
line.
2) When I tried to run this script with AS1.1 & FinderLiaison1.1, I got an
error
on the 'create file' line. Try putting parentheses around the file reference
create (file resName of Folder "Sounds" in Disk "Zot 7.1") replacing yes
The Finder Liaison dictionary says that the Create command expects a
reference to a file and if you don't include parentheses, it tries to
incorporate the 'replacing yes' into the file reference. (I think.)
Good luck,
Vinod
--
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
L Vinod Kurup vvkurup@students.wisc.edu L
L University of Wisconsin Medical School L
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
=========================================================================
Date: Wed, 25 May 1994 11:00:01 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Frontier won't load system scrap
At 10:04 5/25/94 -0800, David Lewis wrote:
>Hi,
>
>I was trying to write a simple FinderMenu script which would put the path
>to the selected item on the clipboard. I had this as the menu script:
>
> copyPathToClipboard (FinderMenu.getSelectionList ())
>
>and (without all the error control) this in copyPathToClipboard:
>
> on copyPathToClipboard (selectionList)
> Frontier.bringToFront () =ABso I can do the next step
> clipboard.putValue (string (selectionList[1])) =ABI've verified thi=
s
> Finder.bringToFront ()
>
>At this point, the Finder's clipboard will remain unchanged. I verified the
>contents of the clipboard in Frontier by putting up a dialog.alert, which
>showed the correct thing. By the way, using appMenu.select ("Finder")
>instead of Finder.bringToFront () makes no difference. Frontier doesn't
>seem to be putting its clipboard contents on the system scrap before doing
>the switch. How can I force this? Thanks.
Hmmm...I routinely use sequences like yours, and have never had a problem
with Finder not *having* the updated clipboard. And...I have used your
script successfully just now in a test. What version of Frontier are you
running (I'm using 3.0.3 (the Power Mac flaver).
--John
--John W. Baxter Port Ludlow, WA USA jwbaxter@pt.olympus.net
UserLand Software support
=========================================================================
Date: Wed, 25 May 1994 13:09:16 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Greg Kearney <gkearney@CSN.ORG>
Subject: clipboard control
A quick question:
What is the best way to get stuff (strings) onto and the clipboard as well
as getting the value of teh clipboard via AppleScript?
Thanks
Greg Kearney
------------------------------------------------------------------------------
gkearney@csn.org Gregory Kearney
(307) 266-0570 voice Howard Publications Newspaper Group
(307) 266-0501 fax 170 Star Lane P.O. Box 80
Casper, Wyoming 82602
------------------------------------------------------------------------------
=========================================================================
Date: Wed, 25 May 1994 14:09:37 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
Subject: Re: Eudora Won't Quit
>I've just started scripting Eudora and I can't get the required suite commands
>"Quit" or "Quit Application" to work.
>
>Here's the code I've tried:
>
>(1)
>tell application "Eudora 1.4.2"
> quit
>end tell
>
>(2)
>quit application "Eudora 1.4.2"
>
>
>Am I doing something radically wrong here?
Isn't it "Eudora1.4.2" (no space before the version number)?
It should be:
tell application "Eudora1.4.2"
quit
end tell
-DM
Desmond K. Mullen - University of Minnesota, Office of Admissions
mulle009@maroon.tc.umn.edu - 612/625-0824 - Minneapolis, Minnesota, USA
=========================================================================
Date: Wed, 25 May 1994 14:38:27 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Kalkwarf <kalkwarf@NETCOM.COM>
Subject: Re: Tao script sample help
>>In BMUG's Tao of AppleScript book there is a sample script on pp94-95 that
>>looks like:
(much verbose, often quoted text removed)
>I think there are 2 problems:
>
>1) "replacing yes" should be on the end of the previous line, not on a
separate
> line.
>
>Try putting parentheses around the file reference:
>
> create (file resName of Folder "Sounds" in Disk "Zot 7.1") replacing yes
Awesome! It worked! Thank you!
Steve
=========================================================================
Date: Wed, 25 May 1994 16:56:28 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Frank Concannon <frank-concannon@UOKHSC.EDU>
Subject: One more Eudora Sort Mail Question
Hi Guys
Below is the script that I would like to use to sort Eudora mail !.
However when I run it it returns an error fron the "move message" section
of the script.
Error Message-
"Eudora1.4.2 got an error: Can't get message ## of mailbox "In" of mail
folder etc etc"
ANY help would be appreciated.
=46rank C. (with the bulging In box)
R&E
PS Any way to auto run a script when Mail arrives ?????
----------------------------******--------------------------
property default : ""
property inBox : "In"
property asBox : "AppleScript list"
tell application "Eudora1.4.2"
activate
set messageCount to count message of mailbox inBox of mail folder
default
repeat with counter from messageCount to 1 by -1
try
set holder to field "Reply" of message counter of
mailbox inBox of mail folder default
on error
set holder to ""
end try
if holder contains ("Macintosh Scripting Systems" as
string) then
move message counter of mailbox inBox of mail
folder default =AC
InsertHere end of mailbox asBox of mail
folder "AppleScript"
end if
end repeat
end tell
----------------------------******--------------------------
=========================================================================
Date: Wed, 25 May 1994 16:13:09 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Lewis <lewis@NETCOM.COM>
Subject: Re: Frontier won't load system scrap
>At 10:04 5/25/94 -0800, David Lewis wrote:
>>Hi,
>>
>>I was trying to write a simple FinderMenu script which would put the path
>>to the selected item on the clipboard. I had this as the menu script:
>>
>> copyPathToClipboard (FinderMenu.getSelectionList ())
>>
>>and (without all the error control) this in copyPathToClipboard:
>>
>> on copyPathToClipboard (selectionList)
>> Frontier.bringToFront () =ABso I can do the next step
>> clipboard.putValue (string (selectionList[1])) =ABI've verified th=
is
>> Finder.bringToFront ()
>>
>>At this point, the Finder's clipboard will remain unchanged. I verified th=
e
>>contents of the clipboard in Frontier by putting up a dialog.alert, which
>>showed the correct thing. By the way, using appMenu.select ("Finder")
>>instead of Finder.bringToFront () makes no difference. Frontier doesn't
>>seem to be putting its clipboard contents on the system scrap before doing
>>the switch. How can I force this? Thanks.
>
>Hmmm...I routinely use sequences like yours, and have never had a problem
>with Finder not *having* the updated clipboard. And...I have used your
>script successfully just now in a test. What version of Frontier are you
>running (I'm using 3.0.3 (the Power Mac flaver).
>
=46rontier 3.0.3, System 7.1, System Update 3.0. Duo 230. What does work
reliably, as it turns out, is to change the menu script to
copyPathToClipboard ()
and the script to
on copyPathToClipboard ()
Frontier.bringToFront ()
local (selectionList =3D FinderMenu.getSelectionList ())
if sizeOf (selectionList) =3D=3D 1 =AB We'll only accept singular va=
lues
clipboard.putValue (string (selectionList[1]))
else
dialog.alert ("Can=B9t copy multiple selections")
Finder.bringToFront ()
=46or one thing, FinderMenu.getSelectionList seems not to work reliably
unless Frontier is brought to the front first. This is my first time with
this verb; all my previous scripts used FinderMenu.visitPaths. Still, I
*had* verified the local contents of the clipboard before. I'm out of
ideas, but at least I have a script which works.
David
David Lewis Seagate Technology (408) 439-2374 lewis@netcom.com
=========================================================================
Date: Wed, 25 May 1994 17:26:00 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Greg Kearney <gkearney@CSN.ORG>
Subject: Eudora question
A question:
How does one set the body of a message from a script? For example:
set theText to "hello out there"
set body of message ... to thetext
------------------------------------------------------------------------------
gkearney@csn.org Gregory Kearney
(307) 266-0570 voice Howard Publications Newspaper Group
(307) 266-0501 fax 170 Star Lane P.O. Box 80
Casper, Wyoming 82602
------------------------------------------------------------------------------
=========================================================================
Date: Wed, 25 May 1994 18:07:13 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Leonard Rosenthol <leonardr@NETCOM.COM>
Subject: Re: Frontier won't load system scrap
Here's what I use to put a CR delimited list of pathnames on the clipboard
from FinderMenu. Note the comment in the middle ;)
bundle {
local(clipStr = "");
on visit(path) {
clipStr = clipStr + path + cr};
FinderMenu.visitPaths (@visit);
Frontier.bringToFront(); + have to do this because of lamo clipboard!
clipboard.put('TEXT', clipStr);
Finder.bringToFront()}
Leonard
-----------------------------------------------------------------------------
Leonard Rosenthol Internet: leonardr@netcom.com
Director of Advanced Technology AppleLink: MACgician
Aladdin Systems, Inc. GEnie: MACgician
=========================================================================
Date: Wed, 25 May 1994 18:52:01 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Doug Baron <userland@NETCOM.COM>
Subject: Re: Importing in Frontier
> Importing in Frontier
>I'm writing an importer for Frontier and have been trying to get the
>exported objects to import without the confirmation dialogs, and
>displaying every imported object.
>
>Does anyone have a technique or script that does this?
>
I've you've ever upgraded Frontier, or have run an Frontier "Installer"
script, you already have example-ware for this. The "Upgrader" and
"Installer" scripts are just fancy desktop scripts. I'd suggest dissecting
an "Installer" script, since the recent "Upgrader" scripts maintain logs
and have a lot of extra logic that you wouldn't normally need.
To see the contents of an Installer script, hold down the command key while
you launch it.
Doug
=========================================================================
Date: Wed, 25 May 1994 18:52:07 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Doug Baron <userland@NETCOM.COM>
Subject: Re: Overhead of function calls in Frontier?
>Has anybody ever done performance timings for various actions in
>Frontier? I'd really like to know the overhead of looking up
>an item in the Object Database versus doing a function call.
>
>For example, suppose I define this table entry:
>
>people.DCM.randomString = "This is a random string"
>
>and use this entry in the following way:
>
>msg(people.DCM.randomString + "...Yes, it is.")
>
>Will that be faster than if I defined a function as follows:
>
>on produceARandomString()
> return ("This is a random string.")
>
>and called it like this:
>
>msg(produceARandomString() + "...Yes, it is")
>
>I'd certainly expect the table lookup to be faster, but by how much?
>
David,
Looking up the data is usually faster. The reason: when you do a function
call, the reference to the script itself goes through the same kind of
lookup as does a data reference. So in one case you have a single data
lookup, in the other you have a data lookup plus a script execution.
It's possible, depending on search paths, that executing a local script
could be as fast, or faster, than referencing a piece of global data. Local
object references are faster than global ones. However, it should be noted
that all of these actions are quite fast. If you're super-sensitive to
performance, I suggest doing your own timing tests, using clock.ticks() and
plenty of iterations.
Doug
=========================================================================
Date: Wed, 25 May 1994 19:35:43 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: Re: One more Eudora Sort Mail Question
>property default : ""
>property inBox : "In"
>property asBox : "AppleScript list"
>
>tell application "Eudora1.4.2"
> activate
> set messageCount to count message of mailbox inBox of mail folder
>default
I think I remember that I had to change it from default to something else
(I chose defaults) because (I'm fuzzy here) default was a reserved word
with some other meaning? I did change it to defaults and it does work for
me so ...
Kee Nethery
_________________________________________________________________
Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
=========================================================================
Date: Wed, 25 May 1994 23:03:51 CDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tom Donovan <donovan@COVIS.NWU.EDU>
Subject: Re: Eudora question
>A question:
>
>How does one set the body of a message from a script? For example:
>
>set theText to "hello out there"
>set body of message ... to thetext
>
>------------------------------------------------------------------------------
>gkearney@csn.org Gregory Kearney
>(307) 266-0570 voice Howard Publications Newspaper Group
>(307) 266-0501 fax 170 Star Lane P.O. Box 80
> Casper, Wyoming 82602
>------------------------------------------------------------------------------
Greg,
Here's the entire script necessary to create an outgoing message:
tell application "Eudora1.4.2"
set theMessage to make ObjectClass message InsertHere end of mailbox "Out"
of mail folder "" --continuation of line above
set field "To" of theMessage to theRecipient
set field "Subject" of theMessage to theSubject
set field "" of theMessage to theMessageText
queue theMessage QueueType 1
end tell
--Tom
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Tom Donovan "The city is a place where a small boy, as he walks
Support Specialist through it, may see something that will tell him what
CoVis Project he wants to do his whole life."
Northwestern Univ.
--Louis I. Kahn
E-mail: donovan@covis.nwu.edu
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=========================================================================
Date: Wed, 25 May 1994 21:31:55 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: clipboard control
>A quick question:
>
>What is the best way to get stuff (strings) onto and the clipboard as well
>as getting the value of teh clipboard via AppleScript?
The Scripting Addition from Jon Pugh ("Jons Commands") does the trick [at
least it SETS the clipboard...Script Editor is in one of its moods right
now, and only shows a blank window when I try to look at the Dictionary for
Jons Commands, so I can't double check getting the clipboard.]
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Thu, 26 May 1994 00:36:06 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Manuel Veloso <veloso@NETCOM.COM>
Subject: Re: MountVolume OSAX
Well, I wrote the thing and I can't remeber. I think you can leave off the
zone, and it will use the default one.
Or, use the zone "*", as that's the current zone.
Manuel
>I have this in my scripting additions folder, and I can't seem to find its
>origin. Is is part of the GTQ library? If so, it is not documented.
>
>In any case, how do you mount a volume without a zone? Giving a zone name of
""
>does not work.
=========================================================================
Date: Wed, 25 May 1994 21:51:38 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Malcolm Pradhan <pradhan@CAMIS.STANFORD.EDU>
Subject: Re: clipboard control [AS]
> The Scripting Addition from Jon Pugh ("Jons Commands") does the trick
> [at least it SETS the clipboard
It does indeed. Here is a very handy script, for use with the OSA menu and
Jon's commands, that gets a list of the items selected in the Finder and
puts their pathnames in the clipboard -- great for users of MPW, MacPerl
and AS.
Many thanks to Mr. Leonard Rosenthol and Mr. Jon Pugh!
Regards,
Malcolm
-------------------------
set fitems to (finder selection)
set i to the number of items of fitems
if i > 0 then
set flist to ""
repeat with n from 1 to i
set flist to flist & (item n of fitems as string) & return
end repeat
set the clipboard to flist
end if
=========================================================================
Date: Thu, 26 May 1994 00:59:49 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Atul Butte <ATUL@BROWNVM.BROWN.EDU>
Subject: Re: The GRRREAT TCP-IP Scripting Addition
>>Is there any way to check if a host name exists in a shorter space of time
>>than the several minutes it takes (while hanging your computer) on a tcp
>>connect command? Ie a tcp check host command, which would return a boolean
>>if there is a host of that name.
Yes, i've written the TCP NAME TO ADDRESS command already... i'm fixing some
other problems with the iso8859-1 translation and writing new Frontmost
sample applications and I'll release the package soon...
(life tends to get busy at the end of a semester... :-)
-- Atul
atul_butte@brown.edu
=========================================================================
Date: Wed, 25 May 1994 18:52:21 +1100
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Norris <michael.norris@STONEBOW.OTAGO.AC.NZ>
Subject: Checking for a files existence
Is there anyway in AppleScript to check whether a file exists on a volume?
Is there anyway to coerce a file reference into an alias, or some other way
of using an alias, without necessarily needing that file to be present
before saving??
Cheers,
Michael Norris,
CAL Consultant,
University of Otago,
PO Box 56,
Dunedin,
New Zealand.
---------------------
Ph:(03) 479-7705
E-Mail: michael.norris@stonebow.otago.ac.nz
=========================================================================
Date: Wed, 25 May 1994 13:23:32 EST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Aaron E. McClennen" <Aaron_E._McClennen@HABITAT.ORG>
Organization: Habitat for Humanity International
Subject: Re: Net Volumes in Frontier
>I would like to test for the availability of a server on the network
>without neccessarily mounting the volume. Does anyone know of a way to do
>this from Frontier?
Shawn et al,
Shawn sorry about the blank message I sent you. I hit "send" by mistake.
To search for a net volume you can embed an attempt to mount the volume in a
try
statement. Like this
try { G to mount other machine to see if it is running
file.mountservervolume(The_network_path,"","");
file.unmoutvolume(The_volume_name);
return(true)}
else {
return(false)}
I haven't debugged the code, but it is based of some working code.
This still mounts the volume, but not for very long.
Aaron_E._McClennen@habitat.org
Habitat for Humanity International
"Building houses with GodUs people in need."
=========================================================================
Date: Thu, 26 May 1994 08:33:41 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Myers <dcmyers@ACCESS.DIGEX.NET>
Subject: Re: Overhead of function calls in Frontier?
Doug Baron writes:
>David,
>
>Looking up the data is usually faster. The reason: when you do a function
>call, the reference to the script itself goes through the same kind of
>lookup as does a data reference. So in one case you have a single data
>lookup, in the other you have a data lookup plus a script execution.
Good point. I often forget how central the Object Database is to
*everything* in Frontier, even function calls. But presumably there
is a set of "kernel" functions which are not executed through scripts??
-David.
____________________________________________________
David C. Myers
dcmyers@access.digex.net
=========================================================================
Date: Thu, 26 May 1994 09:17:31 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
Subject: Re: One more Eudora Sort Mail Question
>PS Any way to auto run a script when Mail arrives ?????
Just have a script always running - you can use an idle handler and have it
"return" every two minutes or so and check for mail.
Use the "set messageCount to count message of mailbox..." line you had, but
do it TWICE - once (before you check for mail) to find out the number of
messages in the box and once (after you check for mail) to find out how
many new ones have arrived. You can use the "connect" command to check for
mail.
So it would look something like this:
-------- part of script ----------
set oldMessageCount to count message of mailbox...
connect
set newMessageCount to count message of mailbox...
set numberOfNewMessages to (newMessageCount - oldMessageCount)
if numberOfNewMessages > 0 then
...
-------- part of script ----------
-DM
Desmond K. Mullen - University of Minnesota, Office of Admissions
mulle009@maroon.tc.umn.edu - 612/625-0824 - Minneapolis, Minnesota, USA
=========================================================================
Date: Thu, 26 May 1994 17:00:02 +0200
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jan Erik Mostr|m <jem@SM.LUTH.SE>
Subject: Re: One more Eudora Sort Mail Question
Hi
I new to this list (of today infact) so I'll hope you excuse me if this is
a common question.
I saw the interesting subject line above (read: I've tried to this myself
but failed ... but I'm new to AppleScript so that doesn't say much) and I
wonder if there is someone who has a script that can sort a mailbox. If so
could you share it ?
jem
=========================================================================
Date: Thu, 26 May 1994 10:31:39 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: One more Eudora Sort Mail Question
In-Reply-To: Your message of "Thu, 26 May 94 17:00:02 +0100"
Jan,
>I new to this list (of today infact) so I'll hope you excuse me if this is
>a common question.
>
>I saw the interesting subject line above (read: I've tried to this myself
>but failed ... but I'm new to AppleScript so that doesn't say much) and I
>wonder if there is someone who has a script that can sort a mailbox. If so
>could you share it ?
Why don't you get the up to the minute digest from the listserv, then you'll
have all of the interesting discussions on Eudora that have occurred this
month. :-)
Send the message
ind macscrpt
to the listserv@dartmouth.edu address. It will return a list of the files
available. Look for the digest file you are interested in (LOG9405 in this
case), and then send the message
get MACSCRPT LOG9405
You can get more information about the various listserv commands by sending
the message
info refcard
Hope this helps.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Thu, 26 May 1994 17:46:31 +0200
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jan Erik Mostr|m <jem@SM.LUTH.SE>
Subject: Re: One more Eudora Sort Mail Question
>Why don't you get the up to the minute digest from the listserv, then you'll
>have all of the interesting discussions on Eudora that have occurred this
>month. :-)
I tried to do something like that using the database system, but I couldn't
understand the syntax at first, and when I finally got something that the
listserv accepted I didn't understand what it meant 8-)
So I gave up ...
>
>get MACSCRPT LOG9405
>
Thanks, I've just sent the message and I'm waiting for the reply.
jem
=========================================================================
Date: Thu, 26 May 1994 11:12:03 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Frank Concannon <frank-concannon@UOKHSC.EDU>
get MACSCRPT LOG9405
=========================================================================
Date: Thu, 26 May 1994 11:30:16 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Frank Concannon <frank-concannon@UOKHSC.EDU>
Sheepish hello
I do apologise for the screw up with the listserver request. I
just was not thinking when I selected the e-mail address.
I suppose this just compounds the offence!!!!!.
Boy Fred that was the fastest response I have ever had to an e-mail message
- of any sort :-)
Frank C.
=========================================================================
Date: Thu, 26 May 1994 12:59:17 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: John Schettino <js12@GTE.COM>
Subject: Re: Opening a literal file with Script Tools 1.3
>Is there a way to coerce a literal file name to what ever the result of
>"choose file" returns? Open file appears to want the type resulting from a
>choose file (or equivalent). Heres the example from Script Tools:
> set paramFile to choose file with prompt "Select params.good ..." of
>type "TEXT"
> set refNum to open file paramFile for reading
>I wanted to do:
> set paramFileName to ":System Folder:Preferences:Send Attach Preferences"
> set paramFile to open file paramFileName for reading
You were real close! This works just fine:
set paramFile to open file alias paramFileName for reading
note the 'alias', tis the magic part.
- john
-----------------------------------------
js12@gte.com GTE Laboratories
John Schettino Waltham, MA
=========================================================================
Date: Thu, 26 May 1994 12:32:58 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Carl Steadman <carl@CDTL.UMN.EDU>
Subject: Re: One more Eudora Sort Mail Question
>>PS Any way to auto run a script when Mail arrives ?????
>
>Just have a script always running - you can use an idle handler and have it
>"return" every two minutes or so and check for mail.
>
You can also use NotifyMail, Scott Gruby's shareware program which uses a
finger connection for immediate notification of new mail. You can have
NotifyMail either notify Eudora, which could then notify your script, or
you could have it run any application when it receives new mail, such as an
AppleScript applet.
It's at
<ftp://mac.archive.umich.edu/mac/system.extensions/init/notifymail2.30.cpt.hqx>
and the mac-archive mirrors.
Carl
_________________________________________
Carl Steadman carl@cdtl.umn.edu
Center for the Development of Technological Leadership
Tel 612.626.9750 Fax 612.624.7510
=========================================================================
Date: Thu, 26 May 1994 13:06:56 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Frank Concannon <frank-concannon@UOKHSC.EDU>
Fellow Script Users
Having finally gotten the Eudora Mail Sorting Script to work
correctly. I thought that I would post some observations and questions.
Observarion number 1) the reason that I could not get the damm thing to
work in the first place seems to be that I was unable to use nested folder
structure for my archive. ie I created a folder within the Eudora folder
(the one in the system) and in this I created my various archive mailboxes.
However the script would not work with this setup. When I moved the
archives to the default folder level everything works fine.
Question Number 1) How do I specify a mail folder other than the default
folder.
Since this script is basically plagerized from several ideas of
regular contributors to this list I can only hope that the authors can
recognize their own contributions and take the following observations
Observarion number 2) counting backwards through the list is vital in that
counting forwards will only move half of the messages at any on run of the
script. The reasons are obvious once you have beaten on it for a few days.
I include the corrected script below which now works fine. You are welcome
to build upon it. (However if you solve the Nested folder problem I would
appreciate an e-mail. I'm going back to automating my lab.!!!!!)
Question Number 2) Anybody have a way of doing spell checking on Eudora ???
Question Number 3) Anybody on this list from Ireland
Bye for now
Frank C.
R&E
--------------------*********-----------------------
property default : ""
property inBox : "In"
property asBox : "MacScript"
tell application "Eudora1.4.2"
activate
set messageCount to count message of mailbox inBox of mail folder
default
repeat with counter from messageCount to 1 by -1
try
set holder to field "Reply" of message counter of
mailbox inBox of mail folder default
on error
set holder to ""
end try
if holder contains ("Macintosh Scripting Systems" as
string) then
move message counter of mailbox inBox of mail
folder default InsertHere end of mailbox asBox of mail folder default
end if
end repeat
end tell
--------------------*********-----------------------
=========================================================================
Date: Thu, 26 May 1994 12:06:20 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
Subject: Re: One more Eudora Sort Mail Question
>Hi Guys
>
>Below is the script that I would like to use to sort Eudora mail !.
>However when I run it it returns an error fron the "move message" section
>of the script.
>
>Error Message-
>
>"Eudora1.4.2 got an error: Can't get message ## of mailbox "In" of mail
>folder etc etc"
>
>ANY help would be appreciated.
>
>
>
>=46rank C. (with the bulging In box)
>R&E
>
>PS Any way to auto run a script when Mail arrives ?????
>
>
>
>----------------------------******--------------------------
>
>property default : ""
>property inBox : "In"
>property asBox : "AppleScript list"
>
>tell application "Eudora1.4.2"
> activate
> set messageCount to count message of mailbox inBox of mail folder
>default
> repeat with counter from messageCount to 1 by -1
> try
> set holder to field "Reply" of message counter of
>mailbox inBox of mail folder default
> on error
> set holder to ""
> end try
> if holder contains ("Macintosh Scripting Systems" as
>string) then
> move message counter of mailbox inBox of mail
>folder default =AC
> InsertHere end of mailbox asBox of mail
>folder "AppleScript"
> end if
> end repeat
>end tell
>
>----------------------------******--------------------------
My best advice to you would be: Buy Eudora 2.0.2. I spent three weeks
noodling around with Eudora scripting (spare time, not constantly - <grin>)
and threw the whole script away when Eudora 2.0.2 showed up yesterday.
v2.0.2's filter is much faster and more reliable than AppleScripting it,
and yes, you can set it up to sort incoming mail.
(This, of course, only applies to sorting mail. I still use scripts for
other functions.)
Kyle
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"I'd feel worse if I weren't under such heavy sedation..."
-David St. Hubbins, Spinal Tap
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
=========================================================================
Date: Thu, 26 May 1994 13:43:31 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Your message of Thu, 26 May 1994 11:30:16 -0600
In-Reply-To: Your message of "Thu, 26 May 94 11:30:16 MDT"
Frank,
>Boy Fred that was the fastest response I have ever had to an e-mail message
>- of any sort :-)
No offence, just usual administratively reminder. Everyone on the list is so
well-behaved that I have to jump at any chance to remind people of things. :-)
Well, sitting at a machine connected to the net is something like driving in a
convertible with the wind whistling past your ears.
pf
=========================================================================
Date: Thu, 26 May 1994 17:22:52 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Andy J. Williams" <Andy.J.Williams@DARTMOUTH.EDU>
Subject: MacScript WWW Server
I don't know if I mentioned this before (memory is the first to go in my
family) so here goes:
I have created a WWW server for our MacScripting list and its associated
archives. Try it out! I am very open to suggestions for
additions/improvements.
The URL is:
http://www.dartmouth.edu/Pages/macscripting/macscripting-home.html
(Or if you have the ability, you can also click <A
href="http://www.dartmouth.edu/Pages/macscripting/macscripting-home.html">here
</a>.)
-A
=========================================================================
Date: Thu, 26 May 1994 17:53:08 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
Subject: Re: MacScript WWW Server
Thanks for the Web site info. It's pretty cool. I couldn't get FTP work,
though...
Oh, check out MY www site! http://www.sci.dixie.edu/strataInc/home.html
Andy Warhol was wrong. In the future, we won't all be famous for fifteen
minutes. We'll all have our own web home page! ;-)
Kyle
>I have created a WWW server for our MacScripting list and its associated
>archives. Try it out! I am very open to suggestions for
>additions/improvements.
>
>The URL is:
>http://www.dartmouth.edu/Pages/macscripting/macscripting-home.html
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"I'd feel worse if I weren't under such heavy sedation..."
-David St. Hubbins, Spinal Tap
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
=========================================================================
Date: Thu, 26 May 1994 18:56:20 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Zellers <steve_zellers@INETLINK.BERKSYS.COM>
Subject: LISTSERV SIGNOFF MACSCRPT
LISTSERV SIGNOFF MACSCRPT
=========================================================================
Date: Thu, 26 May 1994 18:58:37 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Zellers <steve_zellers@INETLINK.BERKSYS.COM>
Subject: LISTSERV SET DIG
LISTSERV SET DIG
=========================================================================
Date: Thu, 26 May 1994 18:58:14 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Zellers <steve_zellers@INETLINK.BERKSYS.COM>
Subject: LISTSERV SUB MACSCRPT
LISTSERV SUB MACSCRPT
=========================================================================
Date: Thu, 26 May 1994 21:06:08 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mike Cohen <isis@NETCOM.COM>
Subject: Re: MacScript WWW Server
At 5:53 PM 5/26/94 -0600, Kyle Maxwell wrote:
>Thanks for the Web site info. It's pretty cool. I couldn't get FTP work,
>though...
>Oh, check out MY www site! http://www.sci.dixie.edu/strataInc/home.html
>
To add to this thread, check out mine ;-)
file://netcom3.netcom.com/pub/isis/home.html. I plan to add a link to the
MacScript home page to it.
_______________________________________________________________
Mike Cohen | ISIS International
(818) 788-4747 Voice | isis@netcom.com | ALink: D6734
(818) 501-0653 Fax | NewtonMail, eWorld: MikeC | AOL: MikeC20
Home Page: file://netcom3.netcom.com/pub/isis/home.html
=========================================================================
Date: Fri, 27 May 1994 00:05:58 CDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tom Donovan <donovan@COVIS.NWU.EDU>
Subject: E-mail address formats/Eudora/Reg Expressions
Scripters,
I have been playing with the Regular Expression osax from Script Tools 1.31
to find a way to pull just the e-mail address from the various header
fields in a Eudora message, and am having my first experience with regular
expressions.
I have seen "From" fields in 3 forms, and the regular expression I came up
with seems to be able to pull the e-mail address from all three:
From: user@machine.host.domain
From: Real Name <user@machine.host.domain>
and From: user@machine.host.domain (Real Name)
My question is, are there any other formats that I should be aware of?
What about legal characters?
Thanks in advance for any info (or pointers to info) you can lend.
--Tom
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Tom Donovan "The city is a place where a small boy, as he walks
Support Specialist through it, may see something that will tell him what
CoVis Project he wants to do his whole life."
Northwestern Univ.
--Louis I. Kahn
E-mail: donovan@covis.nwu.edu
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=========================================================================
Date: Thu, 26 May 1994 22:08:55 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Lewis <lewis@NETCOM.COM>
Subject: Frontier commercial developer's suite bug
Hi,
I just tried to use the commercial developer's suite to build a glue table
for JPEGView 3.3. It has two commands, "open" and "slideShow", which
produce very long lines, and the commercial suite mis-handles them. In the
case of "open" I was able to recover the lost text since Frontier didn't
truncate it until it tried to compile. I could use a continuation line. In
the case of "slideShow" however, the invocation line is too long and the
formal parameters are truncated in the middle so I have no way of finding
out what it was supposed to be. Help?
David
David Lewis Seagate Technology (408) 439-2374 lewis@netcom.com
=========================================================================
Date: Thu, 26 May 1994 22:54:19 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Doug Baron <userland@NETCOM.COM>
Subject: Re: Overhead of function calls in Frontier?
In-Reply-To: <199405261233.FAA26075@mail.netcom.com> from "David Myers" at May
26, 94 08:33:41 am
>
> Good point. I often forget how central the Object Database is to
> *everything* in Frontier, even function calls. But presumably there
> is a set of "kernel" functions which are not executed through scripts??
>
Yes, but the script object containing the kernel reference must be
located in any case. See the script behind file.exist for an example of a
kernel call.
Doug
=========================================================================
Date: Thu, 26 May 1994 23:04:29 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Doug Baron <userland@NETCOM.COM>
Subject: Re: Frontier commercial developer's suite bug
In-Reply-To: <199405270515.WAA06557@mail2.netcom.com> from "David Lewis" at
May 26, 94 10:08:55 pm
> >
> I just tried to use the commercial developer's suite to build a glue table
> for JPEGView 3.3. It has two commands, "open" and "slideShow", which
> produce very long lines, and the commercial suite mis-handles them. In the
> case of "open" I was able to recover the lost text since Frontier didn't
> truncate it until it tried to compile. I could use a continuation line. In
> the case of "slideShow" however, the invocation line is too long and the
> formal parameters are truncated in the middle so I have no way of finding
> out what it was supposed to be. Help?
>
> David
>
> David Lewis Seagate Technology (408) 439-2374 lewis@netcom.com
>
David,
This is rare; I've never heard of this limit being reached before.
Fortunately, the 'aete' importing is done by a script:
commercial.parseAete. In that script, you'll see this pair of lines:
op.setLineText (onStatement)
op.insert (returnStatement, right)
For work around the problem, you'll need to add some extra logic here,
testing string.length(onStatement), and trundating if necessary.
Something like this:
if string.length (onStatement) > 255
for i = 255 downto 1
if onStatement [i] == ' '
op.setlinetext (string.mid (onStatement, 1, i) + '\')
op.insert (string.delete (onStatement, 1, i + 1), right)
This assumes that two lines will do the trick. The same logic would have
to be applied to the returnStatement.
Warning: untested code. Good luck!
Doug
=========================================================================
Date: Thu, 26 May 1994 23:45:14 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Christopher Allen <consensus@NETCOM.COM>
Organization: Consensus Development Corporation, San Francisco, CA USA
Subject: Everyday AppleScript(tm) Contest!
EVERDAY APPLESCRIPT(tm) CONTEST
===============================
Your AppleScript could win $750!
In the ~Everyday AppleScript(tm)~ Contest!
**Prizes:**
Best AppleScript(tm) Script $750
Best Scriptable Application $500
Best Scripting Utility $250
Best Scripting Addition (OSAX) $250
Best Scripting Hack $250
**plus**
Copies of ~Everyday AppleScript(tm)~, MacHack(tm) '94 CD-ROM,
and Free Time on America Online, and More!
**Sponsored by:**
Christopher Allen, author of the ~Everyday AppleScript(tm)~ book
from Addison-Wesley and Forum Leader the Mac Developers Forum on
America Online.
**Rules:**
* Your submission must be Public Domain, Freeware, or Shareware
* You must grant us the right to publish your submission
* You must sign our Submission Form & Permission Agreement
**Deadline:**
All submissions must be recieved before June 17th (by mail),
**or**
Submitted to Christopher Allen in person at MacHack(tm) '94 by 11 P.M.
on June 24th (same deadline as MacHack(tm) contest).
**Winners:**
Winners will be will be announced after the MacHack(tm) Awards on June
25th during MacHack(tm) (June 23-25, Ann Arbor, Michigan)
**More Info:**
Contact Christopher Allen at 415-647-6383 or email to Internet
<consensus@netcom.com> or America Online 'AFL Allen'.
MacHack is a trademark of Expotech, Inc. (not affiliated with
The MacHax(tm) Group.) AppleScript is a trademark of Apple
Computer, Inc.
SUBMISSION FORM & PERMISSION AGREEMENT
--------------------------------------
Please fill out the following submission form and permission agreement:
**Name of the Software:**__________________________________________________.
(i.e., Submitted Work)
**Submitter(s):**__________________________________________________________.
**The Submitted Work is** [ ] Public Domain, [ ] Freeware,
or [ ] Shareware at $___________ [ ] per User or [ ] per __________________.
**Type:**
[ ] AppleScript Script, [ ] Frontier Script, [ ] HyperTalk Script,
[ ] Other OSA Scripting Language _____________, [ ] OSAX,
[ ] Scripting Utility, [ ] Scriptable Application, or [ ] Other: __________.
**Requirements:**
[ ] AppleScript v___, [ ] Frontier v___, [ ] QuickKeys v___, [ ] OSA Menu,
[ ] HyperCard v___, [ ] Other Scripting __________, [ ] Scriptable Finder,
[ ] FaceSpan (FrontMost), [ ] Other Scripting Utility _____________________,
[ ] Scripting Addition (OSAX):_____________________________________________,
[ ] AppleScriptable Application ___________________________________________,
[ ] Other _________________________________________________________________.
**Short Description** (not to exceed 25 words, may be edited by
Publishers for consistency):
___________________________________________________________________________
___________________________________________________________________________
**Long Description** (not to exceed 100 words, may be edited by
Publishers for consistency):
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
The Submitter(s), grant nonexclusive all language world rights in the
Submitted Work to the following companies (Publishers):
* Addison-Wesley Publishing Company, for use in a book by Christopher
Allen titled Everyday AppleScript(tm);
* Expotech, Inc., for use in a MacHack(tm) CD-ROM;
* Mac Developers Forum, for use in the Mac Developers Forum on
America Online;
* Consensus Development Corporation, for use in a future
AppleScript(tm) CD-ROM.
The nonexclusive rights granted to the Publishers include all
editions of the above listed works, and all possible subsidiary and
promotional uses in connection with those works.
A notice & credit line may be required by the Submitter(s) before
inclusion in any of the above works: [ ] No additional notice or
credit lines is required; or [ ] Addison-Wesley Publishing Company,
Consensus Development Corporation, Expotech, Inc., and the Mac
Developers Forum are required to print the following notice & credit
line(s) (not to exceed 50 words):
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
The Submitter(s) warrant that the Submitter(s) are the sole owner of
the copyright in the Submitted Work, the that Submitted Work does not
infringe any other copyright; and that the Submitters have the right
to enter into this agreement without impairing or violating any other
rights or obligations. The Submitter(s) will indemnify the Publishers
and those to whom the Publishers extend these warranties and this
indemnity against loss, damage, or expense (including reasonable
attorneys fees) arising out of breach or alleged breach of these
warranties.
In compensation for these rights, warranties, and indemnification,
the Submitter(s) will be compensated by the Publishers solely by
whatever publicity may result from publishing it in the above works.
In addition, if the Submitted Work is accepted by Addision-Wesley
Publishing Corporation for inclusion in Everyday AppleScript(tm), the
Submitter(s) will receive one (1) copy of the book Everyday
AppleScript(tm).
Signed: __________________________________________
Name: __________________________________________
Date: __________________________________________
Title: __________________________________________
Company: __________________________________________
Address: __________________________________________
__________________________________________
**Please sign and date this form and return it to:**
Everyday AppleScript(tm) Contest
c/o Consensus Development Corporation
4104-24th Street #419
San Francisco, CA 94114-3615
$$
------------------------------------------------------------------------
..Christopher Allen Consensus Development Corporation..
..<consensus@netcom.com> 4104-24th Street #419..
.. San Francisco, CA 94114-3615..
.. o415/647-6383 f415/647-6384..
..Mosaic/World-Wide-Web Front Door: ..
..ftp://netcom7.netcom.com/pub/consensus/www/ConsensusFrontDoor.html ..
=========================================================================
Date: Fri, 27 May 1994 00:24:31 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Glenn Austin <gla-aux!glenn@SKINNER.CS.UOREGON.EDU>
Organization: The Pit Lane
Subject: Re: E-mail address formats/Eudora/Reg Expressions
In Regards to your letter <9405270505.AA10948@tour.covis.nwu.edu>:
> I have seen "From" fields in 3 forms, and the regular expression I came up
> with seems to be able to pull the e-mail address from all three:
>
> From: user@machine.host.domain
>
> From: Real Name <user@machine.host.domain>
>
> and From: user@machine.host.domain (Real Name)
>
>
> My question is, are there any other formats that I should be aware of?
> What about legal characters?
There are two more "acceptable" forms:
site!user@hostsite.domain
and
user%site.UUCP@hostsite.domain
Both are UUCP conventions for contacting those who are tied to the
net, but where some of the hosts don't have up-to-date map information.
For example, these two addresses are equivalent:
gla-aux!glenn@skinner.cs.uoregon.edu
and
glenn%gla-aux.uucp@skinner.cs.uoregon.edu
Of course, if all the routing sites updated their maps, then these two
addresses
would be equivalent to:
glenn@gla-aux.uucp
(I know of this from personal experience -- it took almost 18 months for
the change in my host location from the SF bay area to Oregon to propagate
throughout the net. My old host was still getting mail addressed to me
with no place to send it! And there are *STILL* some hosts which don't know
that I'm located off of skinner, even 3 years after the mapping was changed...)
// Glenn L. Austin
// Macintosh Wizard and Auto Racing Driver
// Usenet: glenn@gla-aux.uucp or ...skinner!gla-aux!glenn
=========================================================================
Date: Fri, 27 May 1994 17:51:06 +1000
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Danny Thomas <D.Thomas@VTHRC.UQ.EDU.AU>
Subject: Re: E-mail address formats/Eudora/Reg Expressions
>I have seen "From" fields in 3 forms, and the regular expression I came up
>with seems to be able to pull the e-mail address from all three:
>
> From: user@machine.host.domain
>
> From: Real Name <user@machine.host.domain>
>
>and From: user@machine.host.domain (Real Name)
>
>
>My question is, are there any other formats that I should be aware of?
>What about legal characters?
for fun you can try X400 addresses. These do sometimes arise in practice.
Obviously rfc822 is a good place to look, and probably worth looking at p90
and 180 of Marshall Rose's "The Internet Message" Prentice Hall ISBN
0-13-092941-7. Depends how seriously you want to do this. Probably 99% will
be handled by the above, so is occasional manual decision-making OK?
cheers,
Danny Thomas
PS as a minor quibble, machine.host.domain is *not* correct. You probably
meant host.domain (machine == host), but MX records allow use of an
arbitrary domain on the RHS of '@'. In fact I'm not alone in strongly
discouraging use of explicit host names.
=========================================================================
Date: Fri, 27 May 1994 09:54:13 +0100
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Johan Solve <johan.solve@ITN.HH.SE>
Subject: Re: (sorting eudora mail)
> Observarion number 2) counting backwards through the list is vital in that
> counting forwards will only move half of the messages at any on run of the
> script. The reasons are obvious once you have beaten on it for a few days.
I count upwards in my sorting script, which is a great advantage since the
order of the inbox is maintained after the sort. Further, the sorter can
handle mail that arrives during the sort.
To accomplish this is easy, just use a counter that you increase only when
you _don't_ move a message. This way, you'll be sure that the script will
sort all incoming mail, including mail that may have arrived after the sort
begun.
You can use a "repeat until counter < mailcount" loop, just make sure you
refresh mailcount on every loop.
_______________________________________________________________________
"
JOHAN SOLVE Department of Science and Technology
<johan.solve@itn.hh.se> Halmstad University, Sweden
=========================================================================
Date: Fri, 27 May 1994 09:40:29 18000
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Ron Fondo <rfondo@FREENET.SCRI.FSU.EDU>
Subject: set macscrpt digest
--
.
.............................................................
. .
. Ron Fondo .
. (work) (home) .
. rfondo@homes.com rfondo@freenet.fsu.edu .
. rfondo@rdesparc.vistachrome.com rfondo@freenet.fl.us .
. rfondo@tapbbs.tlh.fl.us dq465@po.cwru.edu .
. dq465@cleveland.freenet.edu .
.............................................................
=========================================================================
Date: Fri, 27 May 1994 09:52:58 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kyle Maxwell <maxwell@CC.DIXIE.EDU>
Subject: Re: (sorting eudora mail)
Not to beat this particular subject to death, but I've tried both methods
listed below. Counting upwards does have advantages, but the loop you have
to use to make it work eats up clock cycles like you wouldn't believe. On
my 840 av, it takes an average of three minutes to sort my incoming mail
using this method. Admittedly, I get a few hundred messages a day.
However, counting backwards takes less than half the time, and Eudora 2.0.2
sorts it all for me almost instantly.
Just a thought...
Kyle
>> Observarion number 2) counting backwards through the list is vital in that
>> counting forwards will only move half of the messages at any on run of the
>> script. The reasons are obvious once you have beaten on it for a few days.
>
>I count upwards in my sorting script, which is a great advantage since the
>order of the inbox is maintained after the sort. Further, the sorter can
>handle mail that arrives during the sort.
>To accomplish this is easy, just use a counter that you increase only when
>you _don't_ move a message. This way, you'll be sure that the script will
>sort all incoming mail, including mail that may have arrived after the sort
>begun.
>You can use a "repeat until counter < mailcount" loop, just make sure you
>refresh mailcount on every loop.
>
>_______________________________________________________________________
> "
> JOHAN SOLVE Department of Science and Technology
> <johan.solve@itn.hh.se> Halmstad University, Sweden
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Kyle Maxwell, 3d animator, interface designer, all-around kinda guy.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
=========================================================================
Date: Fri, 27 May 1994 11:24:01 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Chuck Shotton <cshotton@OAC.HSC.UTH.TMC.EDU>
Subject: Named parameters in AppleEvent replies
How do you access the named parameters (keywords) returned as part of a
standard reply event from an AppleScript? As far as I can tell, you can
only access the direct parameter in the reply by default. If an application
returns other data in the reply, associated with keyword parameters, what
is the AppleScript syntax for accessing this data?
(Please cc: me on any responses. I only get the digest.)
--_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_\_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Chuck Shotton \
Assistant Director, Academic Computing \ "Shut up and eat your
U. of Texas Health Science Center Houston \ vegetables!!!"
cshotton@oac.hsc.uth.tmc.edu (713) 794-5650 \
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-\-_-_-_-_-_-_-_-_-_-_-_-_-
=========================================================================
Date: Fri, 27 May 1994 09:40:34 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Named parameters in AppleEvent replies
>How do you access the named parameters (keywords) returned as part of a
>standard reply event from an AppleScript? As far as I can tell, you can
>only access the direct parameter in the reply by default. If an application
>returns other data in the reply, associated with keyword parameters, what
>is the AppleScript syntax for accessing this data?
Aside from error handling stuff, you don't access reply parameters other
than the direct object of the reply message ('----' parameter).
AppleScript doesn't do that. [Frontier does, using the complexEvent ()
verb.]
So one can "AppleScript-proof" an application by designing multi-parameter
replies.
The alternative is to return a record whose items are the various values,
or a list of the values. [There's little physical difference between a
record and a list anyhow.]
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Fri, 27 May 1994 12:52:02 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: junk mail; please ignore
Do you open junk mail at home, too? :-)
Sorry, I'm just trying to generate an error on the list by posting a message.
pf
=========================================================================
Date: Fri, 27 May 1994 17:41:35 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Igor Livshits <igorl@UIUC.EDU>
Subject: Eudora's save command?
Howdy,
Has anyone successfully sent a save command to Eudora? If so, may I please
see an example?
Thank you, Igor
_____
NCSA-UIUC, e: igorl@uiuc.edu, w: (217) 244-0424; Have a Coke and a smile :)
=========================================================================
Date: Fri, 27 May 1994 23:03:18 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: (sorting eudora mail)
>Not to beat this particular subject to death, but I've tried both methods
>listed below. Counting upwards does have advantages, but the loop you have
>to use to make it work eats up clock cycles like you wouldn't believe. On
>my 840 av, it takes an average of three minutes to sort my incoming mail
>using this method. Admittedly, I get a few hundred messages a day.
>However, counting backwards takes less than half the time, and Eudora 2.0.2
>sorts it all for me almost instantly.
Not wanting to continue beating on the subject, but the time killer here is
the move from the front of the list. Eudora has to move the whole mailbox
down (well, it's up on screen) to replace the hole left by the moved text.
Moving off the back is simply an EOF change and ~much~ faster.
It's not AppleScript that is slow. It's the process mangler and the
idiosyncrasies of the various scriptable programs that slow scripts down.
Jon
=========================================================================
Date: Sat, 28 May 1994 01:53:13 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "William M. Porter" <WMPORTER@JETSON.UH.EDU>
Subject: OSA Menu
Sorry for bothering the list with what I suspect is a FAQ, but can
somebody tell me more about Leonard Rosenthal's OSA Menu? I have heard
that it will place a "Scripts" menu in my menubar, so that I can have
access to AppleScripts in my System folder. Is it commercial software? If
it's shareware or freeware, is it available on the 'net, and if so where?
Thanks.
Will Porter / University of Houston
wmporter@jetson.uh.edu
=========================================================================
Date: Fri, 27 May 1994 21:15:00 GMT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jay Hebert <jayh@LAISON.W8HD.ORG>
Organization: L'AISON - Beverly Hills, Michigan
Subject: Upload
Hi all...
For the fun of it, I sent a little script for SITComm and FirstClass to
gaea:/incoming. I presume it won't be there long, and will end up in
/applescript/scripts. (Right Fred?)
Description:
Basically, it's for people who, like me, receive their list mail at a
FirstClass site. (Yeah yeah, I could use the GUI, and the CLUI is terrible,
but, with the right aliases, mailreading in the clui can be fast.) It moves a
given range of messages to a folder - configurable on the fly.
Not pretty, not even worth worrying about retaining copyright, etc. Do with
it what you will!
Regards,
Jay Hebert
jayh@laison.w8hd.org (L'AISON)
RedJam/TBX@infoport.com (The Birmingham Exchange)
--
==========================jayh@laison.w8hd.org=========================
Metallica,|| When a man lies he murders / Some part of the world
To Live ||These are the pale deaths which / Men miscall their lives
is || All this I cannot bear / To witness any longer
To Die || Cannot the kingdom of salvation / Take me home
=======================================================================
1) These opinions are mine.-==- 2) Sending me mail gives me
I'm too self-interested to -==- permission to reproduce it in any form
speak for anyone else. -==- unless otherwise explicitly stated.
=========================================================================
Date: Sun, 29 May 1994 17:10:08 +1100
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Norris <michael.norris@STONEBOW.OTAGO.AC.NZ>
Subject: Notification OSAX
Hi. Basically I'm looking for a notification OSAX. I realise that "request
attention" is out there, but this has a few problems:
1) When called from FrontMost, the small icon doesn't flash in the app menu.
2) It ain't called asynchronously (though you can specify a timeout).
So here's what I need:
1) the icon to flash
2) an asynchronous call, so that the notification is posted, then
immediately life carries on as usual without having to switch to the
application first.
Cheers,
Michael Norris,
CAL Consultant,
University of Otago,
PO Box 56,
Dunedin,
New Zealand.
---------------------
Ph:(03) 479-7705
E-Mail: michael.norris@stonebow.otago.ac.nz
=========================================================================
Date: Mon, 30 May 1994 02:10:30 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Marc Lavallee <r27764@ER.UQAM.CA>
Subject: KeyQuencer is great!
I invite all fellow scripters to download "KeyQuencer 1.0" at Sumex. It is
a new macro scripting environment from Alessandro Levi Montalcini. Very
small and efficient, it can replace AppleScript and Quickeys for the
average scripting and automation needs. Here is a sample of the docs:
"KeyQuencer is a very useful control panel that lets you perform complex
tasks with one keystroke. I wrote it because I wasn't satisfied with the
commercial macro engines currently available, as they require lots and
lots of memory and often fill it with less than useful stuff. KeyQuencer
uses a scripting approach; it can't watch your steps to learn new
sequences as other commercial packages do. This requires a bit more work
when you define a new sequence, but the final impact of KeyQuencer on your
system is a lot smaller in terms of memory usage and processor time."
Also, it can be linked to Hypercard and Applescript and extended with
modules written in C.
It may be not as good as AppleScript and/or Quickeys, but it is at least
a great shareware.
Marc Lavallee
r27764@er.uqam.ca
=========================================================================
Date: Mon, 30 May 1994 11:29:55 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Greg Kearney <gkearney@CSN.ORG>
Subject: Activating a scrip from Eudora
Hello All here's what I need to do:
When Eudora recives mail I want ti to run a scrip. I have the script
running just fine I just need to make sure it runs each time eudora gets
new mail. Any help out there?
Thanks
------------------------------------------------------------------------------
gkearney@csn.org Gregory Kearney
(307) 266-0570 voice Howard Publications Newspaper Group
(307) 266-0501 fax 170 Star Lane P.O. Box 80
Casper, Wyoming 82602
------------------------------------------------------------------------------
=========================================================================
Date: Mon, 30 May 1994 11:08:17 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mike Cohen <isis@NETCOM.COM>
Subject: Re: Activating a scrip from Eudora
In-Reply-To: <199405301723.KAA08184@netcom.com> from "Greg Kearney" at May 30,
94 11:29:55 am
>
> Hello All here's what I need to do:
>
> When Eudora recives mail I want ti to run a scrip. I have the script
> running just fine I just need to make sure it runs each time eudora gets
> new mail. Any help out there?
>
> Thanks
>
> -----------------------------------------------------------------------------
-
> gkearney@csn.org Gregory Kearney
> (307) 266-0570 voice Howard Publications Newspaper Group
> (307) 266-0501 fax 170 Star Lane P.O. Box 80
> Casper, Wyoming 82602
> -----------------------------------------------------------------------------
-
>
By sending Eudora a "Please Notify" event with a reference to the application
that should receive the notification, you can have it run an AppleScript saved
as an applet or tell Frontier to run a script.
BTW, Casper sounds like a great place ;-)
--
Mike Cohen | ISIS International
(818) 788-4747 Voice | isis@netcom.com | ALink: D6734
(818) 501-0653 Fax | NewtonMail, eWorld: MikeC | AOL: MikeC20
Home Page: file://ftp.netcom.com/pub/isis/home.html
=========================================================================
Date: Mon, 30 May 1994 13:42:08 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
Subject: Re: Activating a scrip from Eudora
>Hello All here's what I need to do:
>
>When Eudora recives mail I want ti to run a scrip. I have the script
>running just fine I just need to make sure it runs each time eudora gets
>new mail. Any help out there?
Have your script stay open and have _it_ tell Eudora to check for mail at
whatever interval you like:
on idle
tell application "Eudora1.4.2"
-- check how many messages are in the in box
connect
-- check again how many message are in the in box (subtract this new
-- count from the previous count).
-- if there are any new messages then process them as you wish
end tell
return 120 --(seconds)
end idle
You can also send an AppleEvent to Eudora telling it what application to
notify on the arrival of new mail. Read the AE dictionary in Eudora for
details. The message just needs to be sent once, so you can send the
message out of the ScriptEditor for simplicity's sake.
-DM
Desmond K. Mullen - University of Minnesota, Office of Admissions
mulle009@maroon.tc.umn.edu - 612/625-0824
=========================================================================
Date: Mon, 30 May 1994 15:39:51 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "James E. Mitchell" <mitchell@CBIS.ECE.DREXEL.EDU>
Subject: Running Applescript from w/i FileMaker Pro
A neophyte's question.
I wish to use Applescript to add some functions to FileMaker Pro (FMP).
Specifically, my first goal is to take fields, calculate values and place
the results in another field (different calculations for different
records). Sounds simple. I'm pretty sure I can do it if I create a script
or applet in Script Editor then run it to control FMP, but that's not the
way I wish to work. I want the user to open FMP, then have things happen
transparently to them that are impossible solely within FMP. Now the
question:
Can I run Applescripts in a manner transparent to the user from within FMP
that affect FMP?
I managed to make it "open" and run an applet by sending an "open
document" apple event using a FMP script, but had to respond to the "do you
want to run?" dialog box - most annoying.
Ideally what I want to do is put the applescript text in a FMP field, grab
that text as part of a FMP script and run it as an Applescript script. It
seems as though that should be possible but my attempts to do so haven't
worked so far.
Any suggestions of how to do this and/or who to talk to would be most
appreciated.
--
James E. Mitchell - Associate Dean for Undergraduate Affairs
Curtis 261 - College of Engineering - Drexel University - Phil. PA 19104
(215) 895-1374 James.Mitchell@CoE.drexel.edu
************************************************************************
* James E. Mitchell *
* Associate Dean for Undergraduate Affairs * College of Engineering *
* Curtis-261, Drexel University * Philadelphia PA, 19104 *
* (215) 895-1374 * Fax (215) 895-5863 *
* James.Mitchell@CoE.drexel.edu *
************************************************************************
=========================================================================
Date: Mon, 30 May 1994 12:51:10 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Running Applescript from w/i FileMaker Pro
>A neophyte's question.
>
>I wish to use Applescript to add some functions to FileMaker Pro (FMP).
>Specifically, my first goal is to take fields, calculate values and place
>the results in another field (different calculations for different
>records). Sounds simple. I'm pretty sure I can do it if I create a script
>or applet in Script Editor then run it to control FMP, but that's not the
>way I wish to work. I want the user to open FMP, then have things happen
>transparently to them that are impossible solely within FMP. Now the
>question:
>
>Can I run Applescripts in a manner transparent to the user from within FMP
>that affect FMP?
>I managed to make it "open" and run an applet by sending an "open
>document" apple event using a FMP script, but had to respond to the "do you
>want to run?" dialog box - most annoying.
You can eliminate that "do you want to run?" thing either at the time you
save the script application (a checkbox in the Standard File dialog is
Script Editor, or later anytime it is shown (File menu command???).
>Ideally what I want to do is put the applescript text in a FMP field, grab
>that text as part of a FMP script and run it as an Applescript script. It
>seems as though that should be possible but my attempts to do so haven't
>worked so far.
>
>Any suggestions of how to do this and/or who to talk to would be most
>appreciated.
Another option would be to run Leonard Rosenthol's "OSA Menu" extension
(widely available). You get an iconic script menu to the left of the help
menu. This has an area for scripts which are always available, and an area
for scripts associated with the active application. You can put your
script (saved as a compiled script) in there.
What you want is "attachability". FileMaker came out long before that was
possible (in other than very pre-release form, if that), so it's not
surprising that FileMaker doesn't have it. The technology is (now)
available to trigger AppleScript (or Frontier, or ...) scripts when a
button is pressed, a word of text is double-clicked, or pretty much any UI
action the application wants to connect is done. But it has to be written
into the application.
"Tinkerability" is one more step...where the user can modify the as-shipped
actions of UI elements.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Mon, 30 May 1994 18:58:36 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "William M. Porter" <WMPORTER@JETSON.UH.EDU>
Subject: Re: Running Applescript from w/i FileMaker Pro
Open your script from within the Script Editor and resave it with the
"Save As" command. When you do, click on the "Never show startup screen"
check box.
The running of the script will not be 100% transparent, because the open
file event you have sent from within FileMaker will actually open the
script application and the user will observe this happening, that is, he
will notice that he's switched out of FileMaker momentarily. But no
startup (a.k.a. "splash") screen will appear and as soon as the script
starts running, the user will be switched back into FileMaker.
Using Leonard Rosenthol's OSA Menu has the advantage of allowing the user
to run compiled (non-application) scripts, which is a bit speedier and
means that you skip the process of opening the script application.
However, your user will then have to invoke the script by pulling down in
the menu, which I gather you would like to avoid.
I might mention also that I have had some trouble getting OSA MEnu to
work on my LC III and on my PowerBook 165. I'm prepared to discover that
the problem lies in my machines rather than with the work of Mr.
Rosenthol, who is a well known Mac-programming ace. But I haven't solved
the problem yet....
There is yet another alternative: use QuicKeys to run the script....
Will Porter / University of Houston
wmporter@jetson.uh.edu
=========================================================================
Date: Tue, 31 May 1994 08:42:47 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: AppleScript support levels...
In-Reply-To: <no.id> from "John W. Baxter" at May 30, 94 12:51:10 pm
--John W. Baxter wrote:
>
>What you want is "attachability". FileMaker came out long before that was
>possible (in other than very pre-release form, if that), so it's not
>surprising that FileMaker doesn't have it.
Hopefully, this is something that Claris is working on. Anyone have
any idea if FM Pro Server is going to have better AppleScript support
than FM Pro 2.0v2?
>The technology is (now) available to trigger AppleScript (or Frontier,
>or ...) scripts when a button is pressed, a word of text is
>double-clicked, or pretty much any UI action the application wants to
>connect is done. But it has to be written into the application.
And if Apple's Guide to Scriptable Applications is to be believed,
there aren't a whole lot of attachable apps in the works. There are
quite a good deal of scriptable and recordable apps, though.
>"Tinkerability" is one more step...where the user can modify the as-shipped
>actions of UI elements.
Hopefully, InfoDepot 2.0 will be out very shortly and we can all
find out just how cool tinkerability really is. InfoDepot being the only
tinkerable app I've heard of. Any more that anyone knows about?
-Hades
=========================================================================
Date: Tue, 31 May 1994 09:08:45 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Upload
In-Reply-To: Your message of "Fri, 27 May 94 21:15:00 GMT"
>For the fun of it, I sent a little script for SITComm and FirstClass to
>gaea:/incoming. I presume it won't be there long, and will end up in
>/applescript/scripts. (Right Fred?)
Right, Jay. And there are several other scripts that I found queued in the
incoming directory. They can be found in
ftp://gaea.kgs.ukans.edu/applescript/scripts/Move_items_2_folder
ftp://gaea.kgs.ukans.edu/applescript/scripts/edit_file_info_plus_droplet.hqx
ftp://gaea.kgs.ukans.edu/applescript/scripts/edit_file_version_droplet.hqx
ftp://gaea.kgs.ukans.edu/applescript/scripts/freeze_dates_droplet.hqx
ftp://gaea.kgs.ukans.edu/applescript/scripts/res_res_droplet.hqx
ftp://gaea.kgs.ukans.edu/applescript/scripts/text_bbedit_droplet.hqx
As well as the lastest version of Gregory Quinn's osaxen
ftp://gaea.kgs.ukans.edu/applescript/osaxen/gtqscriptlib1.2.sit.hqx
Enjoy.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Tue, 31 May 1994 08:06:07 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Erik C. Thauvin" <ravensys@ESKIMO.COM>
Subject: Re: Upload
In-Reply-To: <199405311411.AA29060@eskimo.com>
I uploaded the following Frontier droplets:
ftp://gaea.kgs.ukans.edu/applescript/scripts/edit_file_info_plus_droplet.hqx
ftp://gaea.kgs.ukans.edu/applescript/scripts/edit_file_version_droplet.hqx
ftp://gaea.kgs.ukans.edu/applescript/scripts/freeze_dates_droplet.hqx
ftp://gaea.kgs.ukans.edu/applescript/scripts/res_res_droplet.hqx
ftp://gaea.kgs.ukans.edu/applescript/scripts/text_bbedit_droplet.hqx
They can also be found in "ftp://eskimo.com/ravensys/frontier/" and short
descriptions of what they actually do are available from the URL listed at
the bottom of my signature.
E.
--
Erik C. Thauvin | Custom Software Solutions | Raven Systems Limited
ravensys@eskimo.com | For Everyday Problems. | P.O. Box 560894
+1 (206) 747-9819 | | Orlando, FL 32856, USA
URL= file://eskimo.com/ravensys/www/raven.html
On Tue, 31 May 1994, Fred Terry wrote:
> >For the fun of it, I sent a little script for SITComm and FirstClass to
> >gaea:/incoming. I presume it won't be there long, and will end up in
> >/applescript/scripts. (Right Fred?)
>
> Right, Jay. And there are several other scripts that I found queued in the
> incoming directory. They can be found in
>
> ftp://gaea.kgs.ukans.edu/applescript/scripts/Move_items_2_folder
> ftp://gaea.kgs.ukans.edu/applescript/scripts/edit_file_info_plus_droplet.hqx
> ftp://gaea.kgs.ukans.edu/applescript/scripts/edit_file_version_droplet.hqx
> ftp://gaea.kgs.ukans.edu/applescript/scripts/freeze_dates_droplet.hqx
> ftp://gaea.kgs.ukans.edu/applescript/scripts/res_res_droplet.hqx
> ftp://gaea.kgs.ukans.edu/applescript/scripts/text_bbedit_droplet.hqx
>
> As well as the lastest version of Gregory Quinn's osaxen
>
> ftp://gaea.kgs.ukans.edu/applescript/osaxen/gtqscriptlib1.2.sit.hqx
>
> Enjoy.
>
> pf
>
>
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
>
=========================================================================
Date: Tue, 31 May 1994 10:08:11 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Apprentice: CD-ROM
Folks,
This isn't quite scripting information, but I thought I'd pass it along since
some of you might find it useful. It includes the early MacScritping digests.
:-)
pf
For Immediate Release
Contact: Christine Convy
Celestin Company
1152 Hastings Avenue
Port Townsend, WA 98368
Phone: 800 835 5514 or 206 385 3767
Fax: 206 385 3586
APPRENTICE: CD-ROM OF OVER 450 MEGABYTES OF MAC SOURCE CODE AND UTILITIES
FOR ONLY $35
Port Townsend, Washington -- May 26, 1994 -- Celestin Company releases
Apprentice, an attractively priced CD-ROM compilation of Mac source code
and utilities. Many Macintosh programmers have been frustrated by the lack
of an inexpensive collection of sample source code. The few collections
that are available are not only out of the price range of many people, but
contain outdated examples that may no longer demonstrate effective
programming techniques. Apprentice contains over 450 megabytes of
up-to-date source code, as well as quality programming utilities to assist
novice as well as experienced developers.
In order to compile such an exhaustive collection of quality source code,
Celestin Company contacted over 200 Macintosh developers and received their
permission to include some of the best programming examples available.
Users will find complete working examples of applications, games, control
panels, extensions, utilities, and much more. Most of the source code is in
C, C++, and Pascal.
PROGRAMMING THE EASY WAY
Those new to Mac programming, will find the included "shell" programs very
useful. These are complete application frameworks that take care of many of
the tedious tasks associated with Mac programming, including menus,
standard dialogs, file handling, and the like. A complete Mac application
can be built in no time, by simply providing the code to perform specific
activities. All other aspects of the Macintosh environment are handled by
the shell utilities.
Apprentice contains dozens of libraries, routines designed around a
specific task, from graphics and sounds to menu management and serial
communications. Many of these libraries include complete source code. Also
included are hundreds of code "snippets", small routines that perform
specific programming tasks. From displaying a color icon or resolving a
file name alias, developers will find what they are looking for in this
definitive collection.
GOOD NEWS FOR MPW USERS
MPW users will find dozens of new and interesting tools, languages, and
utilities, many with complete source code. And developers looking to learn
a new language, or just dabble, will find more than 20 complete standalone
programming environments. Ada, C, Forth, Lisp, Modula-2, Oberon, and Prolog
are only a few of the languages included. Most come with complete
documentation and programming examples, and some include complete source
code to the language itself.
INFORMATION, INFORMATION, INFORMATION
The information hungry will find technical specifications, language
guidelines, programming hints, as well as a complete collection of the
comp.sys.mac.programmer digest, a compendium of information from one of the
best Mac programmer discussion groups on the electronic networks. Also
included are demonstration versions of commercial programmer utilities,
including installers, code and resource editors, database libraries, and
much more.
Everything on the disc is indexed using several different utilities, so
users will find what they are looking for quickly and easily.
Apprentice is $35, which includes standard shipping within the United
States and Canada. It comes with an unconditional 30-day money-back
guarantee, and customers who for any reason are dissatisfied with their
purchase, are entitled to an immediate refund.
-- END --
For more information about Celestin Company and its products, call 206 385
3767, fax 206 385 3586, or email celestin@pt.olympus.net. Apprentice is a
trademark of Celestin Company. All other product names are trademarks or
registered trademarks of their respective companies.
[for best results, print or view this order form using a monospaced font,
such as Courier]
------------------------------ cut here ------------------------------
Dear Celestin Company,
YES, I would like to order Apprentice, The Definitive Collection of Source
Code and Utilities for Mac Programmers.
Please send me ______ copies at $35 each. I understand that this includes
standard shipping within the United States and Canada. Sales tax is also
included for orders within the state of Washington. Add $5 per order
(regardless of quantity) for shipping outside the United States and Canada.
Name __________________________________________________________
Company _______________________________________________________
Address _______________________________________________________
City, State, Zip ______________________________________________
Country _______________________________________________________
Telephone _____________________________________________________
Email address and service _____________________________________
VISA/MC Number ________________________________________________
Expiration Date _______________________________________________
Name on Card __________________________________________________
Note: If you are paying by check, please make it payable to Celestin
Company. We can only accept checks and money orders drawn on U.S. funds
from a U.S. bank. Please allow up to ten days for delivery inside the U.S.
and Canada. Delivery to other locations may take longer.
You may call to place your order at 800 835 5514 or 206 385 3767. You may
fax your order to 206 385 3586. Or, you may email your order on the
Internet to celestin@pt.olympus.net.
Celestin Company, 1152 Hastings Avenue, Port Townsend, WA 98368, United
States of America.
--
celestin@pt.olympus.net (Paul Celestin, Celestin Company)
Home of Apprentice - the Mac Programmer Source Code & Utilities CD-ROM
Check out my URL: file://speedway.net/pub/celestin/www/Celestin.html
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry Cadence Design Systems pfterry@lks.csi.com +1 913 841 1283
=========================================================================
Date: Tue, 31 May 1994 10:14:16 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Upload
In-Reply-To: Your message of "Tue, 31 May 94 08:06:07 PDT"
>I uploaded the following Frontier droplets:
>
>ftp://gaea.kgs.ukans.edu/applescript/scripts/edit_file_info_plus_droplet.hqx
>ftp://gaea.kgs.ukans.edu/applescript/scripts/edit_file_version_droplet.hqx
>ftp://gaea.kgs.ukans.edu/applescript/scripts/freeze_dates_droplet.hqx
>ftp://gaea.kgs.ukans.edu/applescript/scripts/res_res_droplet.hqx
>ftp://gaea.kgs.ukans.edu/applescript/scripts/text_bbedit_droplet.hqx
Ooooops. That's what I get for moving the files without downloading and
checking them out first. These will be moved to
ftp://gaea.kgs.ukans.edu/frontier/droplets/
Sorry bout that.
pf
=========================================================================
Date: Tue, 31 May 1994 13:18:36 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Herb Schilling <hschilling@LERC.NASA.GOV>
Subject: What is firstLaunch ?
Hello,
I was trying to create a handler called "FirstLaunch". AppleScript
insisted on writing it as firstLaunch so I assume AppleScript is already
aware of it as a handler or variable. ( I s this correct ? ) .
I can't find any documentation of this variable or handler and when I try
using it in a script as either a variable or handler ( firstLaunch() ),
AppleScript says it does not know anything about it.
I can work around my problem, of course, but it would be nice to know what
is going on. Thanks !
--
Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
sshws@convx1.lerc.nasa.gov
AppleLink: SCHILLING.H
=========================================================================
Date: Tue, 31 May 1994 13:26:28 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "George R. Brown" <gbrown@PARTECH.COM>
Subject: Keyboard modifiers for droplets
Is there a way to tell if the shift, option, control, or combination keys
were pressed within a drag-and-drop script application. I want to modify
the behavior of a script slightly if the modifiers are down (i.e. prompt vs
no prompt for additional info).
- gb (george@partech.com)
=========================================================================
Date: Tue, 31 May 1994 10:34:51 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: What is firstLaunch ?
>Hello,
>
> I was trying to create a handler called "FirstLaunch". AppleScript
>insisted on writing it as firstLaunch so I assume AppleScript is already
>aware of it as a handler or variable. ( I s this correct ? ) .
>
>I can't find any documentation of this variable or handler and when I try
>using it in a script as either a variable or handler ( firstLaunch() ),
>AppleScript says it does not know anything about it.
Hmmm...
With a freshly-started Script Editor, I get the expected results with
----------------------
on firstlaunch()
display dialog "looks ok here"
end firstlaunch
firstlaunch()
----------------------
in the untitled script window. That is, it compiles fine (note that it
left the "l" lower case), and does the display dialog when executed.
Something about the context in which you are working defines firstLaunch.
Is that context FrontMost/FaceSpan by any chance?
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Tue, 31 May 1994 13:41:49 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Keyboard modifiers for droplets
In-Reply-To: <no.id> from "George R. Brown" at May 31, 94 01:26:28 pm
--George R. Brown wrote:
>
>Is there a way to tell if the shift, option, control, or combination keys
>were pressed within a drag-and-drop script application. I want to modify
>the behavior of a script slightly if the modifiers are down (i.e. prompt vs
>no prompt for additional info).
I asked this question a week or so ago, and it never received a
response. I've tried using the (keys pressed) function from Jon's
Commands but all I get are beeps when I try to hold down keys...
-Hades
=========================================================================
Date: Tue, 31 May 1994 14:07:13 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Paul Roma <shelbel@ENGIN.UMICH.EDU>
Subject: Powertalk
Hello,
I am attempting to script applemail so that it looks automatically for
incoming mail and replies with a standard message. Is this possible, I
cannot find the apple event for powertalk to recognize that mail has arived.
If you know of a way to do this or can possibly be of assistance, it
wou
ld
be appreciated if you could contact me.
=========================================================================
Paul Roma Phone: 313-747-0048
Computer Systems Consultant Fax: 313-747-0036
Office of Technology Transfer Email: shelbel@engin.umich.edu
University of Michigan College of Engineering
2901 Hubbard, A113
Ann Arbor, MI 48109-2016
=========================================================================
Date: Tue, 31 May 1994 13:15:52 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Igor Livshits <igorl@UIUC.EDU>
Subject: Re: Keyboard modifiers for droplets
At 1:41 PM 5/31/94 -0400, you wrote:
>--George R. Brown wrote:
>>
>>Is there a way to tell if the shift, option, control, or combination keys
>>were pressed within a drag-and-drop script application. I want to modify
>>the behavior of a script slightly if the modifiers are down (i.e. prompt vs
>>no prompt for additional info).
>
> I asked this question a week or so ago, and it never received a
>response. I've tried using the (keys pressed) function from Jon's
>Commands but all I get are beeps when I try to hold down keys...
>
>-Hades
Hmm, works fine with my script. Check out Trash old messages (on gaea and
Info-Mac).
Cheers, Igor
_____
NCSA-UIUC, e: igorl@uiuc.edu, w: (217) 244-0424; Have a Coke and a smile :)
=========================================================================
Date: Tue, 31 May 1994 11:37:30 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 408 974 7889 <kee@KAGI.COM>
Subject: Re: scripting Powertalk
> I am attempting to script applemail so that it looks automatically for
>incoming mail and replies with a standard message. Is this possible, I
>cannot find the apple event for powertalk to recognize that mail has arived.
I have tried Beyond's PowerRules and the QT something or other osax Library
that has some PowerTalk commands. After thrashing on PowerRules for a long
time, I have abandoned it for Eudora. I found that many of the PowerRules
sample scripts did not work on the later versions of PowerRules. Seemed
that as each new rev came out, fewer sample scripts would work. The GTQ or
whatever osax library has some PowerTalk osaxs that query catalogs and send
mail but he has never seen specs for reading AppleMail and thus he has not
written an osax to send AppleMail.
Unless someone else knows of some other alternatives, I suggest Eudora.
Kee Nethery
=========================================================================
Date: Tue, 31 May 1994 14:56:43 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Herb Schilling <hschilling@LERC.NASA.GOV>
Subject: Re: What is firstLaunch ?
>
>Hmmm...
>With a freshly-started Script Editor, I get the expected results with
>
>----------------------
>on firstlaunch()
> display dialog "looks ok here"
>end firstlaunch
>
>firstlaunch()
>----------------------
I am just using the AppleScript Script Editor also. When I put your code
into a fresh window, and do a Check Syntax, it DOES uppercase the "l". I
guess I must have some Addition that you don't have. I poked around the
dictionaries of the ones I have to see if it is there, but can't find it. I
have so many, it would take a long time to check them all. Is there a quick
way to create a list of all the handlers,etc... in your Additions folder ?
To see if it was something in my Additions folder, I took all of my
Scripting Additions out of my Scripting Additions Folder temporarily and
tried to check the syntax on your script ( but with the "L" uppercase ). I
got a "Could not compile the script because the file could not be found"
error.
>
>in the untitled script window. That is, it compiles fine (note that it
>left the "l" lower case), and does the display dialog when executed.
>
--
Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
sshws@convx1.lerc.nasa.gov
AppleLink: SCHILLING.H
=========================================================================
Date: Tue, 31 May 1994 15:11:16 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Keyboard modifiers for droplets
In-Reply-To: <no.id> from "Igor Livshits" at May 31, 94 01:15:52 pm
--Igor Livshits wrote:
>
>--Brian V. Hughes wrote:
>>
>> I asked this question a week or so ago, and it never received a
>>response. I've tried using the (keys pressed) function from Jon's
>>Commands but all I get are beeps when I try to hold down keys...
>
>Hmm, works fine with my script. Check out Trash old messages (on gaea and
>Info-Mac).
Yes, it seems I spoke too soon. Pressing one of the modifier keys
works just fine. What I wanted was for someone to be able to hold down a
regular alphanumeric key. Apparantly (keys pressed) doesn't handle this.
-Hades
=========================================================================
Date: Tue, 31 May 1994 15:26:17 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: What is firstLaunch ?
In-Reply-To: <no.id> from "Herb Schilling" at May 31, 94 02:56:43 pm
--Herb Schilling wrote:
>
>>on firstlaunch()
>> display dialog "looks ok here"
>>end firstlaunch
>>
>>firstlaunch()
>
>I am just using the AppleScript Script Editor also. When I put your code
>into a fresh window, and do a Check Syntax, it DOES uppercase the "l". I
>guess I must have some Addition that you don't have. I poked around the
>dictionaries of the ones I have to see if it is there, but can't find it. I
>have so many, it would take a long time to check them all. Is there a quick
>way to create a list of all the handlers,etc... in your Additions folder ?
Hmm... you must have some strange stuff installed in your Scripting
Additions folder. The firstlaunch() handle above works just fine for me
as well, although I was running into a really strange problem similar to
this in Frontmost. I was trying to assign a variable from a loaded
script and I accidentally typed it as "theRUles" instead of "theRules"
which is how it appears in the loaded script. Now, no matter what I try
I can't seem to use a variable called "theRules" in the Frontmost
project. Everytime I compile the script I end up with "theRUles". I'm
hoping there is a solution to this problem because Frontmost gives me a
variable not found error when I try to get the value of "theRUles" from
the loaded script.
-Hades
=========================================================================
Date: Tue, 31 May 1994 12:38:53 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: What is firstLaunch ?
>>
>>Hmmm...
>>With a freshly-started Script Editor, I get the expected results with
>>
>>----------------------
>>on firstlaunch()
>> display dialog "looks ok here"
>>end firstlaunch
>>
>>firstlaunch()
>>----------------------
>
>I am just using the AppleScript Script Editor also. When I put your code
>into a fresh window, and do a Check Syntax, it DOES uppercase the "l". I
>guess I must have some Addition that you don't have. I poked around the
>dictionaries of the ones I have to see if it is there, but can't find it. I
>have so many, it would take a long time to check them all. Is there a quick
>way to create a list of all the handlers,etc... in your Additions folder ?
Herb...
Here's a list of the files in my Scripting Additions folder at the
moment (select All in Finder, Copy, Paste into a text editor). The list is
quite short...I try to keep only Apple's Additions and ones I'm actively
using, to reduce the sort of name pollution you are seeing. This is a
problem that is only going to get worse with time.
app menu
Beep
Choose Application
Choose File
Current Date
Dialects
Display Dialog
=46ile Commands
Is Modern Memory
Jon=B9s Commands
Load Script
MacPPP Control
New File
Numerics
Run Script
Scripting Components
Store Script
String Commands
TickCount
Time to GMT
I should have mentioned before that AppleScript styled the firstlaunch as a
user (me) defined variable, handler, etc. I could see that
clearly...unfortunately I didn't mention it.
>To see if it was something in my Additions folder, I took all of my
>Scripting Additions out of my Scripting Additions Folder temporarily and
>tried to check the syntax on your script ( but with the "L" uppercase ). I
>got a "Could not compile the script because the file could not be found"
>error.
To make experiments like that meaningful, you at least need to quit the
Script Editor and restart it after taking things out of Scripting Additions
(Script Editor has a long memory). Restarting the Mac is better, since the
event handlers for the additions remain installed when you drag them out of
the folder.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Tue, 31 May 1994 12:44:19 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Keyboard modifiers for droplets
Brian V. Hughes wrote:
>
> Yes, it seems I spoke too soon. Pressing one of the modifier keys
>works just fine. What I wanted was for someone to be able to hold down a
>regular alphanumeric key. Apparantly (keys pressed) doesn't handle this.
Ah, but holding down one of the character-generating keys generates a
stream of autokey events which overflows somebody's event queue (whatever
context the applet runs in--presumably its own, although that issue is lots
cloudier than it was 10 years ago). That's not likely to be a productive
exercise. [It might get one or two events into Finder's queue before the
switch, too.]
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Tue, 31 May 1994 16:03:38 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Keyboard modifiers for droplets
In-Reply-To: <no.id> from "John W. Baxter" at May 31, 94 12:44:19 pm
--John W. Baxter wrote:
>
>Brian V. Hughes wrote:
>>
>> Yes, it seems I spoke too soon. Pressing one of the modifier keys
>>works just fine. What I wanted was for someone to be able to hold down a
>>regular alphanumeric key. Apparantly (keys pressed) doesn't handle this.
>
>Ah, but holding down one of the character-generating keys generates a
>stream of autokey events which overflows somebody's event queue (whatever
>context the applet runs in--presumably its own, although that issue is lots
>cloudier than it was 10 years ago).
Pardon me while I go over into the corner and pretend not the feel
like the idiot I am. ;-> It's really amazing how the simplest things
just slip your mind, like auto-repeating keyboards.
>That's not likely to be a productive exercise. [It might get one or two
>events into Finder's queue before the switch, too.]
Yeah, you're right. I guess I'll have to find another way to handle
this...
-Hades
=========================================================================
Date: Tue, 31 May 1994 17:23:50 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Shaddar@AOL.COM
Subject: "Loggin As" from GTQLib 1.2
In the docs from GTQ scripting library v1.2 it says not to nest loggin as
commands. Is there any way to have a script log on to more than one server
at a time. I am writing a script which will let the user enter a password
once and log on to all the servers in the network (administrative tasks)
instead of each one individually.
Thanks ;)
~Josh~
=========================================================================
Date: Tue, 31 May 1994 17:23:45 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Shaddar@AOL.COM
Subject: Invisible files
Is there any way to tell if a file is visible or invisible, and to alter this
condition? (ie, make all invisible files in a folder visible, or make a
droplet which makes the file invisible)
Thanks
~Josh~
=========================================================================
Date: Tue, 31 May 1994 16:49:44 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tom Donovan <donovan@COVIS.NWU.EDU>
Subject: Re: Eudora AS questions
This is a fairly old thread, but I don't remember seeing answers to a few
of Kee's questions:
Kee Nethery writes:
>1. The following AppleScript does not work, any idea what AppleScript is used
>to delete a message in the In Box that has not been marked as read?
>
>----------
>property defaults : ""
>property inBox : "In"
>property i : {1}
>
>delete message i of mailbox inBox of mail folder defaults
>----------
>
>
I seem to remember needing to "move" a given message to the "Trash"--I
forget the syntax, though.
>2. The following AppleScripts do not return the internet address of the person
>who sent the message. Field "From:" returns the entire contents of the from
>field and that does work as a return address but it includes all the extra
>text identifying the sender such as for me, my name and phone number.
>Sender returns only the stuff in the From field that I do not want. What I
>desire is the stuff in the From field that is not what you return as
>Sender. What would be the proper form for acquiring just the domain style
>return address of the sender?
>
>----------
>set x to field "From:" of message i of mailbox inBox of mail folder defaults
>set x to Sender of message i of mailbox inBox of mail folder defaults
>----------
>
>
I have been playing with the Regular Expressions osax from Script Tools and
the following lines seem to work at pulling just the Internet address
portion from the header line:
set expr to compile regular expression "[^ \\(\\<]*@[-a-zA-Z0-9\\.]+"
match regular expression expr to msgFrom
("msgFrom" is the text of the header field; This snippet just returns the
e-mail address as the result--you'll probably want to assign it to a
variable.>
<<Clip...>>
>
>Thanks all, this mailing list is a very big help.
>
>Kee Nethery
>
>
>_________________________________________________________________
>Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
Hope this helps.
-Tom
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Tom Donovan "The city is a place where a small boy, as he walks
System Administrator through it, may see something that will tell him what
CoVis Project he wants to do his whole life."
Northwestern Univ.
--Louis I. Kahn
E-mail: donovan@covis.nwu.edu
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=========================================================================
Date: Tue, 31 May 1994 14:46:55 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Joe Lopez <lopezjf@SCE.COM>
Subject: Recieving notification from Eudora
I am fairly new to applescript but have been learning alot by just joining
this list. I figured out how to get Eudora 1.4.2 to notify an application
when it received mail but how does an applescript app receive this
notification?
i.e.
on what
-- handle the received mail
end what
what is the code that catches the notification sent to it?
--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
_/ _/ _/ _/_/_/_/ _/_/_/_/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/_/_/_/ _/ _/_/_/_/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/_/_/_/ _/_/_/_/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/_/_/_/ _/ _/ _/
Joe Lopez Southern California Edison lopezjf@sce.com
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=========================================================================
Date: Tue, 31 May 1994 15:44:13 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 408 974 7889 <kee@KAGI.COM>
Subject: Re: Eudora AS questions
Thank you, your info does help answer my questions.
Kee
=========================================================================
Date: Tue, 31 May 1994 16:33:30 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Leonard Rosenthol <leonardr@NETCOM.COM>
Subject: Re: scripting Powertalk
Would people be interested in a scriptable mailer for PowerTalk? Something
akin to AppleMail but with FULL scriptability (ie. text/WP suite, mail
suite, etc.). Would you be willing to pay for it? If so, how much?
Feel free to either post a responce back to the list or EMail me directly...
Leonard
P.S. This is a non-Aladdin related question...
=========================================================================
Date: Tue, 31 May 1994 16:52:55 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Lewis <lewis@NETCOM.COM>
Subject: Re: Invisible files
>Is there any way to tell if a file is visible or invisible, and to alter this
>condition? (ie, make all invisible files in a folder visible, or make a
>droplet which makes the file invisible)
You didn't say to which scripting environment you had access. In Frontier,
the FinderFlags extension allows one to do what you wish.
FinderFlag.get (filePath, 14)
will return true if the file is invisible, and FinderFlag.set or
FinderFlag.clear will allow you to manipulate it.
David
David Lewis Seagate Technology (408) 439-2374 lewis@netcom.com
=========================================================================
Date: Tue, 31 May 1994 18:46:16 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Invisible files
David Lewis replies to a question:
>>Is there any way to tell if a file is visible or invisible, and to alter this
>>condition? (ie, make all invisible files in a folder visible, or make a
>>droplet which makes the file invisible)
>
>You didn't say to which scripting environment you had access. In Frontier,
>the FinderFlags extension allows one to do what you wish.
> FinderFlag.get (filePath, 14)
>will return true if the file is invisible, and FinderFlag.set or
>FinderFlag.clear will allow you to manipulate it.
Very true, David. The older built-in verbs file.isVisible (path) and
file.setVisible (path, setting) are probably easier to use [and to read in
the scripts later], though.
There's probably a Scripting Addition around to do the job (if there isn't,
it would be trivial to write...probably also trivial to convert the
FinderFlags UCMD to a Scripting Addition, but I don't seem to have
FinderFlags installed, so I can't check).
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Tue, 31 May 1994 18:48:10 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Michel <michel@NETCOM.COM>
Subject: Re: Invisible files
>Is there any way to tell if a file is visible or invisible, and to alter this
>condition? (ie, make all invisible files in a folder visible, or make a
>droplet which makes the file invisible)
>
>Thanks
>
>~Josh~
As David Lewis mentioned, Frontier can do it.
It's interesting. The File Commands scripting Addition lets you find out if
a file is invisible, but doesn't let you change it. The Scriptable Finder,
on the other hand, doesn't do _anyything_ with invisible files!
================================================================
"In order to come up with something that rings true, you would
have to stay out of the way of that information machine that
everyone is plugged into. If you're plugged into the same
information machine, then there's no point to write, 'cause then
everyone knows the same thing."
-- Bob Dylan
================================================================
=========================================================================
Date: Tue, 31 May 1994 20:53:35 CDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tom Donovan <donovan@COVIS.NWU.EDU>
Subject: Re: Recieving notification from Eudora
>I am fairly new to applescript but have been learning alot by just joining
>this list. I figured out how to get Eudora 1.4.2 to notify an application
>when it received mail but how does an applescript app receive this
>notification?
>
>i.e.
>
>on what
> -- handle the received mail
>end what
>
>what is the code that catches the notification sent to it?
>
>--
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> _/ _/ _/ _/_/_/_/ _/_/_/_/ _/ _/ _/
> _/ _/ _/ _/ _/ _/ _/
> _/ _/ _/ _/_/_/_/ _/ _/_/_/_/ _/ _/ _/
> _/ _/ _/ _/ _/ _/ _/ _/
> _/ _/ _/ _/ _/_/_/_/ _/_/_/_/ _/ _/ _/
> _/ _/ _/ _/ _/ _/ _/
>_/ _/ _/ _/_/_/_/ _/ _/ _/
>
> Joe Lopez Southern California Edison lopezjf@sce.com
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Here it is:
on =ABevent CSOmeNot=BB msgList
--I forget what "msgList" contains--you can play with it
--do useful stuff here
end =ABevent CSOmeNot=BB
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Tom Donovan "The city is a place where a small boy, as he walks
Support Specialist through it, may see something that will tell him what
CoVis Project he wants to do his whole life."
Northwestern Univ.
--Louis I. Kahn
E-mail: donovan@covis.nwu.edu
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=========================================================================
Date: Tue, 31 May 1994 23:12:57 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "James E. Mitchell" <mitchell@CBIS.ECE.DREXEL.EDU>
Subject: Working Current Record in FileMaker
Another Neophyte question. How do I get FilemakerPro to work with the
"current record" - i.e. the one that is selected by FMP to be active? If I
have more than one showing FMP selects the first record, not the current
one. I've tried a large variety of "current record" formats in a statement,
but keeping getting errors? It looks as though "current record" ought to be
possible since it is a property of the database.
************************************************************************
* James E. Mitchell *
* Associate Dean for Undergraduate Affairs * College of Engineering *
* Curtis-261, Drexel University * Philadelphia PA, 19104 *
* (215) 895-1374 * Fax (215) 895-5863 *
* James.Mitchell@CoE.drexel.edu *
************************************************************************